library(plyr)
library(dplyr)
library(foreign)
library(readstata13)
library(sf)
require(rgdal)
library(maptools)
library(rgeos)
library(lme4)
library(survival)
library(car)
library(MASS)
library(survey)
library(stargazer)
library(tidyr)
library(stringr)
library(ggplot2)
library(sjPlot)
library(sjmisc)

setwd("/Users/laurahuber/Documents/Papers/Women PK and Support in TCC/FPA Submission/Replication Code and Data/")

sink("WomenPKinTCCFPA.log", append=TRUE, split=TRUE)


###################################################################################################################################################


#                                                             Main Analysis



###################################################################################################################################################

###Load Data Sets###

#Elite Survey#
elite <- read.csv("Elite Survey Replication Data.csv",stringsAsFactors = F)



#First Experiment: Mixed Gender Unit#
south.africa.1 <- read.csv("South Africa 1 Replication Data.csv",stringsAsFactors = F, na.strings=c("","NA"))
colnames(south.africa.1)

india.1 <- read.csv("India 1 Replication Data.csv",stringsAsFactors = F, na.strings=c("","NA"))
colnames(india.1)



#Second Experiment: Women Casualty#
south.africa.2 <- read.csv("South Africa 2 Replication Data.csv",stringsAsFactors = F, na.strings=c("","NA"))
colnames(south.africa.2)

india.2 <- read.csv("India 2 Replication Data.csv",stringsAsFactors = F, na.strings=c("","NA"))
colnames(india.2)



#################################################Elite Survey Results#################################################

#Descriptive Statistics#
prop.table(table(elite$citizenssupport)) 
prop.table(table(elite$considerpublic)) 
prop.table(table(elite$valuablegoal)) 
prop.table(table(elite$womensupporthost))
prop.table(table(elite$womensupporttpcc)) 
prop.table(table(elite$womencas))
prop.table(table(elite$mencas)) 
prop.table(table(elite$whichworse)) 
prop.table(table(elite$gender))  
prop.table(table(elite$region)) 



###Plots##

#Figure 1: Whether Deployment of Women Increases Support in TCC"
#Define factor levels
elite$womensupporttpcc <- factor(elite$womensupporttpcc, 
                                 levels = c("Strongly disagree", "Somewhat disagree", "Neither agree nor disagree","Somewhat agree","Strongly agree"))


#Plot
ggplot(elite, aes(x=womensupporttpcc)) +
  geom_bar() +
  scale_x_discrete(drop=FALSE)  + theme_bw() + 
  ggtitle("Elite Survey Responses on Whether Deployment of Women Peacekeepers Increase Support in TCC") +
  labs(y = "Number of Respondents", x = "Level of Agreement") +
  theme(axis.text=element_text(size=14),axis.title=element_text(size=18,face="bold")) + 
  theme(plot.title = element_text(size=20))



#Figure 2: Whether consider Public Opinion
#Define factor levels
elite$considerpublic <- factor(elite$considerpublic, 
                                 levels = c("Strongly disagree", "Somewhat disagree", "Neither agree nor disagree","Somewhat agree","Strongly agree"))


#Plot
ggplot(elite, aes(x=considerpublic)) +
  geom_bar() +
  scale_x_discrete(drop=FALSE)  + theme_bw() + 
  ggtitle("Elite Survey Responses on Whether their Country Considers Public Opinion on Peacekeeping") +
  labs(y = "Number of Respondents", x = "Level of Agreement") +
  theme(axis.text=element_text(size=14),axis.title=element_text(size=18,face="bold")) + 
  theme(plot.title = element_text(size=20))






#Figure 3: Whether Value Increasing Public Support
#Define factor levels
elite$valuablegoal <- factor(elite$valuablegoal, 
                               levels = c("Strongly disagree", "Somewhat disagree", "Neither agree nor disagree","Somewhat agree","Strongly agree"))


#Plot
ggplot(elite, aes(x=valuablegoal)) +
  geom_bar() +
  scale_x_discrete(drop=FALSE)  + theme_bw() + 
  ggtitle("Elite Survey Responses on Whether Increasing Support for Peacekeeping is Valuable") +
  labs(y = "Number of Respondents", x = "Level of Agreement") +
  theme(axis.text=element_text(size=14),axis.title=element_text(size=18,face="bold")) + 
  theme(plot.title = element_text(size=20))




#Figure 4: Whether Casualties Decrease Support
#Define factor levels
elite$whichworse1 <- factor(elite$whichworse, 
                             levels = c("A man and a woman peacekeeper casualty would cause the same decrease in support", 
                                        "A woman peacekeeper casualty would cause a larger decrease in support than a man peacekeeper casualty",
                                        "A man peacekeeper casualty would cause a larger decrease in support than a woman peacekeeper casualty",
                                        "Neither a woman nor a man peacekeeper casualty would cause a decrease in support"))


#Plot
elitelabels <- c("Equal for Men and Women", "Woman", "Man","Neither")

ggplot(elite, aes(x=whichworse1)) +
  geom_bar() +
  scale_x_discrete(drop=FALSE)  + theme_bw() + 
  ggtitle("Elite Survey Responses on Whether Man or Woman Casualties Would Decrease Support More") +
  labs(y = "Number of Respondents", x = "Level of Agreement") +
  theme(axis.text=element_text(size=18),axis.title=element_text(size=18,face="bold")) + 
  theme(plot.title = element_text(size=20))+ scale_x_discrete(labels= elitelabels)






#Figure 5: Whether Woman Casualties Decrease Support
#Define factor levels
elite$womencas <- factor(elite$womencas, 
                             levels = c("Strongly disagree", "Somewhat disagree", "Neither agree nor disagree","Somewhat agree","Strongly agree"))

ggplot(elite, aes(x=womencas)) +
  geom_bar() +
  scale_x_discrete(drop=FALSE)  + theme_bw() + 
  ggtitle("Elite Survey Responses on Whether a Woman Casualties Would Decrease Support for Peacekeeping") +
  labs(y = "Number of Respondents", x = "Level of Agreement") +
  theme(axis.text=element_text(size=14),axis.title=element_text(size=18,face="bold")) + 
  theme(plot.title = element_text(size=20))









#################################################Experiment 1: Mixed Gender Unit Treatment#############################################################

######Support for contributions#####
prop.table(table(south.africa.1$contributePK))
prop.table(table(india.1$contributePK))


prop.table(table(south.africa.1$contributemoney))
prop.table(table(india.1$contributemoney))

summary(south.africa.1$gendercontrols_8)
prop.table(table(south.africa.1$gendercontrols_8))

summary(india.1$gendercontrols_8)



##South Africa##
summary(mod1SA <- lm(as.numeric(contributePK) ~ female_treat, data=south.africa.1 ))
summary(mod2SA <- lm(as.numeric(contributemoney) ~ female_treat, data=south.africa.1 ))

##India##
summary(mod1I <- lm(as.numeric(contributePK) ~ female_treat, data=india.1 ))
summary(mod2I <- lm(as.numeric(contributemoney) ~ female_treat, data=india.1 ))



######Support for Women#'s Rights######

south.africa.1$moreoverallsexism <- south.africa.1$gendercontrols_1 + south.africa.1$gendercontrols_2 + south.africa.1$gendercontrols_3 + south.africa.1$gendercontrols_4 + south.africa.1$gendercontrols_5 + south.africa.1$gendercontrols_6 + south.africa.1$gendercontrols_7 + south.africa.1$gendercontrols_8 + south.africa.1$gendercontrols_10 + south.africa.1$gendercontrols_11 + south.africa.1$gendercontrols_12 + south.africa.1$gendercontrols_13 + south.africa.1$gendercontrols_14 + south.africa.1$gendercontrols_15
india.1$moreoverallsexism <- india.1$gendercontrols_1 + india.1$gendercontrols_2 + india.1$gendercontrols_3 + india.1$gendercontrols_4 + india.1$gendercontrols_5 + india.1$gendercontrols_6 + india.1$gendercontrols_7 + india.1$gendercontrols_8 + india.1$gendercontrols_10 + india.1$gendercontrols_11 + india.1$gendercontrols_12 + india.1$gendercontrols_13 + india.1$gendercontrols_14 + india.1$gendercontrols_15


##South Africa##
summary(mod3SA <- lm(as.numeric(moreoverallsexism) ~ female_treat, data=south.africa.1 ))

##India##
summary(mod3I <- lm(as.numeric(moreoverallsexism) ~ female_treat, data=india.1 ))


####Table 1#####
stargazer(mod1I,mod1SA,mod2I,mod2SA,mod3I,mod3SA,digits=2)









#################################################Experiment 2: Woman Casualty Treatment#############################################################

######Support for contributions#####
prop.table(table(south.africa.2$contributePK))
prop.table(table(india.2$contributePK))


prop.table(table(south.africa.2$contributemoney))
prop.table(table(india.2$contributemoney))

summary(south.africa.2$gendercontrols_8)
prop.table(table(south.africa.2$gendercontrols_8))

summary(india.2$gendercontrols_8)


###South Africa###

##Descriptives##
south.africa.2$moreoverallsexism <- south.africa.2$gendercontrols_1 + south.africa.2$gendercontrols_2 + south.africa.2$gendercontrols_3 + south.africa.2$gendercontrols_4 + south.africa.2$gendercontrols_5 + south.africa.2$gendercontrols_6 + south.africa.2$gendercontrols_7 + south.africa.2$gendercontrols_8 + south.africa.2$gendercontrols_10 + south.africa.2$gendercontrols_11 + south.africa.2$gendercontrols_12 + south.africa.2$gendercontrols_13 + south.africa.2$gendercontrols_14 + south.africa.2$gendercontrols_15
india.2$moreoverallsexism <- india.2$gendercontrols_1 + india.2$gendercontrols_2 + india.2$gendercontrols_3 + india.2$gendercontrols_4 + india.2$gendercontrols_5 + india.2$gendercontrols_6 + india.2$gendercontrols_7 + india.2$gendercontrols_8 + india.2$gendercontrols_10 + india.2$gendercontrols_11 + india.2$gendercontrols_12 + india.2$gendercontrols_13 + india.2$gendercontrols_14 + india.2$gendercontrols_15


#Figure 6: Density Plots of South African Responses to Sexism Index By Treatment Status
ggplot(data=south.africa.2,aes(x=moreoverallsexism, linetype = factor(female_treat))) + geom_density(alpha=0.25) + theme_bw() + 
  labs(linetype="Viewed Woman Casualty Story")  +
  labs(y = "Density", x = "Sexist Beliefs") +
  theme(axis.text=element_text(size=14),axis.title=element_text(size=18,face="bold")) + 
  theme(plot.title = element_text(size=18))


##Regression Models##
summary(mod4SA <- lm(as.numeric(south.africa.2$contributePK) ~ female_treat, data=south.africa.2 ))
summary(mod5SA <- lm(as.numeric(contributemoney) ~ female_treat, data=south.africa.2 ))

summary(mod6SA <- lm(as.numeric(angry) ~ female_treat, data=south.africa.2 ))
summary(mod7SA <- lm(as.numeric(sad) ~ female_treat, data=south.africa.2 ))
summary(mod8SA <- lm(as.numeric(mistake_tosend) ~ female_treat, data=south.africa.2 ))


summary(mod.sexism.southafrica.2 <- lm(as.numeric(moreoverallsexism) ~ female_treat, data=south.africa.2 ))



###India##

summary(mod4I <- lm(as.numeric(india.2$contributePK) ~ female_treat, data=india.2 ))
summary(mod5I<- lm(as.numeric(contributemoney) ~ female_treat, data=india.2 ))

summary(mod6I <- lm(as.numeric(angry) ~ female_treat, data=india.2 ))
summary(mod7I <- lm(as.numeric(sad) ~ female_treat, data=india.2 ))
summary(mod8I <- lm(as.numeric(mistake_tosend) ~ female_treat, data=india.2 ))


summary(mod.sexism.india.2 <- lm(as.numeric(moreoverallsexism) ~ female_treat, data=india.2 ))


#######Table 2######
stargazer(mod4I,mod4SA,
          mod5I,mod5SA,
          mod7I,mod6SA,
          mod6I,mod6SA,
          mod8I,mod8SA,
          digits=2,
          covariate.labels = c("Treated Woman Casualty", "Constant"))


#######Table 3######
stargazer(mod.sexism.india.2,mod.sexism.southafrica.2,
          digits=2,
          covariate.labels = c("Treated Woman Casualty", "Constant"))










###################################################################################################################################################
###################################################################################################################################################

#                                                          Appendix

###################################################################################################################################################
###################################################################################################################################################


###################################################################################################################################################

########Manipulation Checks#########

#South Africa 1#

#check how many correctly knew the gender composition of the group
south.africa.1$manipulation_pass_treat1 <- ifelse(south.africa.1$treat1_manipulation1 == "250 men", 1, 0)
south.africa.1$manipulation_pass_treat2 <- ifelse(south.africa.1$treat2_manipulation1 == "200 men and 50 women", 1, 0)
south.africa.1$manipulation_pass <- ifelse(is.na(south.africa.1$manipulation_pass_treat1)==TRUE,south.africa.1$manipulation_pass_treat2, south.africa.1$manipulation_pass_treat1)

summary(south.africa.1$manipulation_pass) #89% 
summary(south.africa.1$manipulation_pass_treat1) #84
summary(south.africa.1$manipulation_pass_treat2) #94
####the all men pass rate was 84%; the mixed gender pass rate was 94%


#India 1

###Check manipulation checks###
summary(india.1$manipulation_pass) #88%
summary(india.1$manipulation_pass_treat2) #91% of treatment group identified correctly
summary(india.1$manipulation_pass_treat1) #86% of non-treated group identified correctly


#South Africa 2

###Check manipulation checks###
summary(south.africa.2$manipulation_pass) #92%
summary(south.africa.2$manipulation_pass_treat2) #89% of treatment group identified correctly
summary(south.africa.2$manipulation_pass_treat1) #94% of non-treated group identified correctly



#India 2

###Check manipulation checks###
summary(india.2$manipulation_pass) #89%
summary(india.2$manipulation_pass_treat2) #85% of treatment group identified correctly
summary(india.2$manipulation_pass_treat1) #93% of non-treated group identified correctly






###################################################################################################################################################
##########Summary Statistics##########
stargazer(india.1)
stargazer(india.2)

stargazer(south.africa.1)
stargazer(south.africa.2)





###################################################################################################################################################
############Perceived Effectiveness##########

#South Africa
summary(mod.effbd.south.africa.1 <- lm(as.numeric(effective_preventbattledeaths) ~ female_treat, data=south.africa.1 ))
summary(mod.effprotciv.south.africa.1 <- lm(as.numeric(effective_protectcivilians) ~ female_treat, data=south.africa.1 ))
summary(mod.efftrainmil.south.africa.1 <- lm(as.numeric(effective_trainmilitary) ~ female_treat, data=south.africa.1 ))
summary(mod.effmen.south.africa.1 <- lm(as.numeric(effective_localmen) ~ female_treat, data=south.africa.1 ))
summary(mod.effwomen.south.africa.1 <- lm(as.numeric(effective_localwomen) ~ female_treat, data=south.africa.1 ))
summary(mod.effref.south.africa.1 <- lm(as.numeric(effective_refugees) ~ female_treat, data=south.africa.1 ))
summary(mod.effhr.south.africa.1 <- lm(as.numeric(effective_humanrights) ~ female_treat, data=south.africa.1 ))
summary(mod.effsv.south.africa.1 <- lm(as.numeric(effective_sexualviolence) ~ female_treat, data=south.africa.1 ))

#India
summary(mod.effbd.india.1 <- lm(as.numeric(effective_preventbattledeaths) ~ female_treat, data=india.1 ))
summary(mod.effprotciv.india.1 <- lm(as.numeric(effective_protectcivilians) ~ female_treat, data=india.1 ))
summary(mod.efftrainmil.india.1 <- lm(as.numeric(effective_trainmilitary) ~ female_treat, data=india.1 ))
summary(mod.effmen.india.1 <- lm(as.numeric(effective_localmen) ~ female_treat, data=india.1 ))
summary(mod.effwomen.india.1 <- lm(as.numeric(effective_localwomen) ~ female_treat, data=india.1 ))
summary(mod.effref.india.1 <- lm(as.numeric(effective_refugees) ~ female_treat, data=india.1 ))
summary(mod.effhr.india.1 <- lm(as.numeric(effective_humanrights) ~ female_treat, data=india.1 ))
summary(mod.effsv.india.1 <- lm(as.numeric(effective_sexualviolence) ~ female_treat, data=india.1 ))

stargazer(mod.effbd.south.africa.1,mod.effprotciv.south.africa.1,mod.efftrainmil.south.africa.1,mod.effmen.south.africa.1,mod.effwomen.south.africa.1,
          mod.effref.south.africa.1,mod.effhr.south.africa.1,mod.effsv.south.africa.1,digits=2)

stargazer(mod.effbd.india.1,mod.effprotciv.india.1,mod.efftrainmil.india.1,mod.effmen.india.1,mod.effwomen.india.1,
          mod.effref.india.1,mod.effhr.india.1,mod.effsv.india.1,digits=2)




###################################################################################################################################################
###########Alternative Modeling: Ordinal Logistic Regression#################################

#South Africa 1
summary(mod.contributepk.south.africa.1.logistic <- polr(as.factor(contributePK) ~ female_treat, data=south.africa.1 ))
summary(mod.contributemoney.south.africa.1.logistic <- polr(as.factor(contributemoney) ~ female_treat, data=south.africa.1 ))

summary(mod.sexism.south.africa.1.logistic <- polr(as.factor(moreoverallsexism) ~ female_treat, data=south.africa.1 ))


#India 1
summary(mod.contributepk.india.1.logistic <- polr(as.factor(contributePK) ~ female_treat, data=india.1 ))
summary(mod.contributemoney.india.1.logistic <- polr(as.factor(contributemoney) ~ female_treat, data=india.1 ))

summary(mod.sexism.india.1.logistic <- polr(as.factor(moreoverallsexism) ~ female_treat, data=india.1 ))


#South Africa 2
summary(mod.contributepk.south.africa.2.logistic <- polr(as.factor(contributePK) ~ female_treat, data=south.africa.2 ))
summary(mod.contributemoney.south.africa.2.logistic <- polr(as.factor(contributemoney) ~ female_treat, data=south.africa.2 ))
summary(mod.sad.south.africa.2.logistic <- polr(as.factor(sad) ~ female_treat, data=south.africa.2 ))
summary(mod.angry.south.africa.2.logistic <- polr(as.factor(angry) ~ female_treat, data=south.africa.2 ))
summary(mod.mistake.south.africa.2.logistic <- polr(as.factor(mistake_tosend) ~ female_treat, data=south.africa.2 ))

summary(mod.sexism.south.africa.2.logistic <- polr(as.factor(moreoverallsexism) ~ female_treat, data=south.africa.2 ))


#India 2
summary(mod.contributepk.india.2.logistic <- polr(as.factor(contributePK) ~ female_treat, data=india.2 ))
summary(mod.contributemoney.india.2.logistic <- polr(as.factor(contributemoney) ~ female_treat, data=india.2 ))
summary(mod.sad.india.2.logistic <- polr(as.factor(sad) ~ female_treat, data=india.2 ))
summary(mod.angry.india.2.logistic <- polr(as.factor(angry) ~ female_treat, data=india.2 ))
summary(mod.mistake.india.2.logistic <- polr(as.factor(mistake_tosend) ~ female_treat, data=india.2 ))


summary(mod.sexism.india.2.logistic <- polr(as.factor(moreoverallsexism) ~ female_treat, data=india.2 ))


stargazer(mod.contributepk.india.1.logistic,mod.contributepk.south.africa.1.logistic,mod.contributemoney.india.1.logistic,mod.contributemoney.south.africa.1.logistic,digits=2)

stargazer(mod.sexism.india.1.logistic,mod.sexism.south.africa.1.logistic,digits=2)

stargazer(mod.contributepk.india.2.logistic,mod.contributepk.south.africa.2.logistic,mod.contributemoney.india.2.logistic,mod.contributemoney.south.africa.2.logistic,
          mod.sad.india.2.logistic,mod.sad.south.africa.2.logistic,mod.angry.india.2.logistic,mod.angry.south.africa.2.logistic, 
          mod.mistake.india.2.logistic , mod.mistake.south.africa.2.logistic , digits=2)

stargazer(mod.sexism.india.2.logistic,mod.sexism.south.africa.2.logistic,digits=2)






###################################################################################################################################################
###########################Heterogeneous Results#################################


##India 1 ## 

#########By Respondent Gender#######
india.1$womanrespondent <- ifelse(india.1$gender=="Woman",1,0)

summary(mod.contributepk.india.1.hetwomen <- lm(contributePK ~ female_treat*womanrespondent, data=india.1 ))
summary(mod.contributemoney.india.1.hetwomen  <- lm(contributemoney ~ female_treat*womanrespondent, data=india.1 ))

summary(mod.sexism.india.1.hetwomen  <- lm(moreoverallsexism ~ female_treat*womanrespondent, data=india.1 ))

stargazer(mod.contributepk.india.1.hetwomen,mod.contributemoney.india.1.hetwomen,
          mod.sexism.india.1.hetwomen, digits=2)


#####By Sexism#####
summary(mod.contributepk.india.1.sexism.hetwomen <- lm(contributePK ~ female_treat*moreoverallsexism, data=india.1 ))
summary(mod.contributemoney.india.1.sexism.hetwomen <- lm(contributemoney ~ female_treat*moreoverallsexism, data=india.1 ))

stargazer(mod.contributepk.india.1.sexism.hetwomen,mod.contributemoney.india.1.sexism.hetwomen, digits=2)





##By Age##
summary(mod.contributepk.india.1.hetage <- lm(contributePK ~ female_treat*age, data=india.1 ))
summary(mod.contributemoney.india.1.hetage <- lm(contributemoney ~ female_treat*age, data=india.1 ))

summary(mod.sexism.india.1.hetage <- lm(moreoverallsexism~ female_treat*age, data=india.1 ))


stargazer(mod.contributepk.india.1.hetage,mod.contributemoney.india.1.hetage,
          mod.sexism.india.1.hetage, digits=2)



####By Party###
summary(mod.contributepk.india.1.hetparty <- lm(contributePK ~ female_treat*as.numeric(partywarmth_1) +  female_treat*as.numeric(partywarmth_2), data=india.1 ))
summary(mod.contributemoney.india.1.hetparty <- lm(contributemoney ~ female_treat*as.numeric(partywarmth_1)+  female_treat*as.numeric(partywarmth_2), data=india.1 ))

summary(mod.sexism.india.1.hetparty <- lm(moreoverallsexism~ female_treat*as.numeric(partywarmth_1)+  female_treat*as.numeric(partywarmth_2), data=india.1 ))


stargazer(mod.contributepk.india.1.hetparty,mod.contributemoney.india.1.hetparty,
          mod.sexism.india.1.hetparty, digits=2)





###By PK Knowledge###
summary(mod.contributepk.india.1.hetpkknow <- lm(contributePK ~ female_treat*pknowledge, data=india.1 ))
summary(mod.contributemoney.india.1.hetpkknow <- lm(contributemoney ~ female_treat*pknowledge, data=india.1 ))

summary(mod.sexism.india.1.hetpkknow <- lm(moreoverallsexism~ female_treat*pknowledge, data=india.1 ))


stargazer(mod.contributepk.india.1.hetpkknow,mod.contributemoney.india.1.hetpkknow,mod.sexism.india.1.hetpkknow, digits=2)






###By PK Knowledge Choice###
summary(mod.contributepk.india.1.hetsc <- lm(contributePK ~ female_treat*as.factor(securitycouncil), data=india.1 ))
summary(mod.contributemoney.india.1.hetsc<- lm(contributemoney ~ female_treat*as.factor(securitycouncil), data=india.1 ))

summary(mod.sexism.india.1.hetsc <- lm(moreoverallsexism~ female_treat*as.factor(securitycouncil), data=india.1 ))


stargazer(mod.contributepk.india.1.hetsc,mod.contributemoney.india.1.hetsc,
          mod.sexism.india.1.hetsc, digits=2)




###By Urban Rural###
summary(mod.contributepk.india.1.heturban <- lm(contributePK ~ female_treat*as.factor(ruralurban), data=india.1 ))
summary(mod.contributemoney.india.1.heturban <- lm(contributemoney ~ female_treat*as.factor(ruralurban), data=india.1 ))

summary(mod.sexism.india.1.heturban <- lm(moreoverallsexism~ female_treat*as.factor(ruralurban), data=india.1 ))


stargazer(mod.contributepk.india.1.heturban,mod.contributemoney.india.1.heturban,
          mod.sexism.india.1.heturban, digits=2)



##By religion
summary(mod.contributepk.india.1.hetreligion <- lm(contributePK ~ female_treat*as.factor(religion), data=india.1 ))
summary(mod.contributemoney.india.1.hetreligion <- lm(contributemoney ~ female_treat*as.factor(religion), data=india.1 ))

summary(mod.sexism.india.1.hetreligion <- lm(moreoverallsexism~ female_treat*as.factor(religion), data=india.1 ))


stargazer(mod.contributepk.india.1.hetreligion,mod.contributemoney.india.1.hetreligion,
          mod.sexism.india.1.hetreligion, digits=2)







##By ethnicity

#Need to code ethnicity into categories#
table(india.1$ethnicity)

india.1$ethnicityassamese <- ifelse(india.1$ethnicity == "Assamese",1,
                                    ifelse(india.1$ethnicity == "Assamese,Bengali",1,
                                           ifelse(india.1$ethnicity == "Assamese,Bengali,Gujarati,Hindi",1,
                                                  ifelse(india.1$ethnicity == "Assamese,Bengali,Gujarati,Hindi,Kashmiri,Konkani,Marathi,Punjabi,Kannadiga,Malayali,Tamil,Telugu,Tulu",1,
                                                         ifelse(india.1$ethnicity == "Assamese,Bengali,Hindi",1,
                                                                ifelse(india.1$ethnicity == "Assamese,Bengali,Hindi,Other",1,
                                                                       ifelse(india.1$ethnicity == "Assamese,Gujarati,Kashmiri,Marathi,Malayali",1,
                                                                              ifelse(india.1$ethnicity == "Assamese,Hindi",1,
                                                                                     ifelse(india.1$ethnicity == "Assamese,Hindi,Other",1,0)))))))))



india.1$ethnicitybengali <- ifelse(india.1$ethnicity == "Assamese,Bengali",1,
                                   ifelse(india.1$ethnicity == "Assamese,Bengali,Gujarati,Hindi",1,
                                          ifelse(india.1$ethnicity == "Assamese,Bengali,Gujarati,Hindi,Kashmiri,Konkani,Marathi,Punjabi,Kannadiga,Malayali,Tamil,Telugu,Tulu",1,
                                                 ifelse(india.1$ethnicity == "Assamese,Bengali,Hindi",1,
                                                        ifelse(india.1$ethnicity == "Assamese,Bengali,Hindi,Other",1,
                                                               ifelse(india.1$ethnicity == "Bengali",1,
                                                                      ifelse(india.1$ethnicity == "Bengali,Gujarati,Hindi",1,
                                                                             ifelse(india.1$ethnicity == "Bengali,Gujarati,Kashmiri,Marathi",1,
                                                                                    ifelse(india.1$ethnicity == "Bengali,Hindi",1,
                                                                                           ifelse(india.1$ethnicity == "Bengali,Hindi,Kashmiri,Konkani,Marathi,Kannadiga,Malayali",1,
                                                                                                  ifelse(india.1$ethnicity == "Bengali,Hindi,Kashmiri,Marathi,Punjabi,Kannadiga,Malayali",1,
                                                                                                         ifelse(india.1$ethnicity == "Bengali,Hindi,Konkani,Punjabi",1,
                                                                                                                ifelse(india.1$ethnicity == "Bengali,Hindi,Malayali",1,
                                                                                                                       ifelse(india.1$ethnicity == "Bengali,Hindi,Marathi,Kannadiga",1,
                                                                                                                              ifelse(india.1$ethnicity == "Bengali,Hindi,Punjabi",1,
                                                                                                                                     ifelse(india.1$ethnicity == "Bengali,Hindi,Tamil",1,
                                                                                                                                            ifelse(india.1$ethnicity == "Bengali,Marathi",1,0)))))))))))))))))


india.1$ethnicitygujarati <- ifelse(india.1$ethnicity == "Assamese,Bengali,Gujarati,Hindi",1,
                                    ifelse(india.1$ethnicity == "Assamese,Bengali,Gujarati,Hindi,Kashmiri,Konkani,Marathi,Punjabi,Kannadiga,Malayali,Tamil,Telugu,Tulu",1,
                                           ifelse(india.1$ethnicity == "Assamese,Gujarati,Kashmiri,Marathi,Malayali",1,
                                                  ifelse(india.1$ethnicity == "Bengali,Gujarati,Hindi",1,
                                                         ifelse(india.1$ethnicity == "Bengali,Gujarati,Kashmiri,Marathi",1,
                                                                ifelse(india.1$ethnicity == "Gujarati",1,
                                                                       ifelse(india.1$ethnicity == "Gujarati,Hindi",1,
                                                                              ifelse(india.1$ethnicity == "Gujarati,Hindi,Konkani,Marathi",1,
                                                                                     ifelse(india.1$ethnicity == "Gujarati,Hindi,Malayali",1,
                                                                                            ifelse(india.1$ethnicity == "Gujarati,Hindi,Marathi,Punjabi",1,
                                                                                                   ifelse(india.1$ethnicity == "Gujarati,Hindi,Punjabi",1,0)))))))))))



india.1$ethnicityhindi <- ifelse(india.1$ethnicity == "Assamese,Bengali,Gujarati,Hindi",1,
                                 ifelse(india.1$ethnicity == "Assamese,Bengali,Gujarati,Hindi,Kashmiri,Konkani,Marathi,Punjabi,Kannadiga,Malayali,Tamil,Telugu,Tulu",1,
                                        ifelse(india.1$ethnicity == "Assamese,Bengali,Hindi",1,
                                               ifelse(india.1$ethnicity == "Assamese,Bengali,Hindi,Other",1,
                                                      ifelse(india.1$ethnicity == "Assamese,Hindi",1,
                                                             ifelse(india.1$ethnicity == "Assamese,Hindi,Other",1,
                                                                    ifelse(india.1$ethnicity == "Bengali,Gujarati,Hindi",1,
                                                                           ifelse(india.1$ethnicity == "Bengali,Hindi",1,
                                                                                  ifelse(india.1$ethnicity == "Bengali,Hindi,Kashmiri,Konkani,Marathi,Kannadiga,Malayali",1,
                                                                                         ifelse(india.1$ethnicity == "Bengali,Hindi,Kashmiri,Marathi,Punjabi,Kannadiga,Malayali",1,
                                                                                                ifelse(india.1$ethnicity == "Bengali,Hindi,Konkani,Punjabi",1,
                                                                                                       ifelse(india.1$ethnicity == "Bengali,Hindi,Malayali",1,
                                                                                                              ifelse(india.1$ethnicity == "Bengali,Hindi,Marathi,Kannadiga",1,
                                                                                                                     ifelse(india.1$ethnicity == "Bengali,Hindi,Punjabi",1,
                                                                                                                            ifelse(india.1$ethnicity == "Bengali,Hindi,Tamil",1,
                                                                                                                                   ifelse(india.1$ethnicity == "Gujarati,Hindi",1,
                                                                                                                                          ifelse(india.1$ethnicity == "Gujarati,Hindi,Konkani,Marathi",1,
                                                                                                                                                 ifelse(india.1$ethnicity == "Gujarati,Hindi,Malayali",1,
                                                                                                                                                        ifelse(india.1$ethnicity == "Gujarati,Hindi,Marathi,Punjabi",1,
                                                                                                                                                               ifelse(india.1$ethnicity == "Gujarati,Hindi,Punjabi",1,
                                                                                                                                                                      ifelse(india.1$ethnicity == "Hindi",1,
                                                                                                                                                                             ifelse(india.1$ethnicity == "Hindi,Kannadiga",1,
                                                                                                                                                                                    ifelse(india.1$ethnicity == "Hindi,Konkani,Marathi",1,
                                                                                                                                                                                           ifelse(india.1$ethnicity == "Hindi,Marathi",1,
                                                                                                                                                                                                  ifelse(india.1$ethnicity == "Hindi,Marathi,Kannadiga",1,
                                                                                                                                                                                                         ifelse(india.1$ethnicity == "Hindi,Marathi,Punjabi",1,
                                                                                                                                                                                                                ifelse(india.1$ethnicity == "Hindi,Other",1,
                                                                                                                                                                                                                       ifelse(india.1$ethnicity == "Hindi,Punjabi",1,
                                                                                                                                                                                                                              ifelse(india.1$ethnicity == "Hindi,Tamil",1,
                                                                                                                                                                                                                                     ifelse(india.1$ethnicity == "Hindi,Tamil,Telugu",1,
                                                                                                                                                                                                                                            ifelse(india.1$ethnicity == "Hindi,Telugu,Other",1,0)))))))))))))))))))))))))))))))


india.1$ethnicitykannadiga <- ifelse(india.1$ethnicity == "Assamese,Bengali,Gujarati,Hindi,Kashmiri,Konkani,Marathi,Punjabi,Kannadiga,Malayali,Tamil,Telugu,Tulu",1,
                                     ifelse(india.1$ethnicity == "Bengali,Hindi,Kashmiri,Konkani,Marathi,Kannadiga,Malayali",1,
                                            ifelse(india.1$ethnicity == "Bengali,Hindi,Kashmiri,Marathi,Punjabi,Kannadiga,Malayali",1,
                                                   ifelse(india.1$ethnicity == "Bengali,Hindi,Marathi,Kannadiga",1,
                                                          ifelse(india.1$ethnicity == "Hindi,Kannadiga",1,
                                                                 ifelse(india.1$ethnicity == "Hindi,Marathi,Kannadiga",1,
                                                                        ifelse(india.1$ethnicity == "Kannadiga",1,
                                                                               ifelse(india.1$ethnicity == "Kannadiga,Telugu",1,
                                                                                      ifelse(india.1$ethnicity == "Kannadiga,Tulu",1,0)))))))))

india.1$ethnicitykashmiri <- ifelse(india.1$ethnicity == "Assamese,Bengali,Gujarati,Hindi,Kashmiri,Konkani,Marathi,Punjabi,Kannadiga,Malayali,Tamil,Telugu,Tulu",1,
                                    ifelse(india.1$ethnicity == "Assamese,Gujarati,Kashmiri,Marathi,Malayali",1,
                                           ifelse(india.1$ethnicity == "Bengali,Gujarati,Kashmiri,Marathi",1,
                                                  ifelse(india.1$ethnicity == "Bengali,Hindi,Kashmiri,Konkani,Marathi,Kannadiga,Malayali",1,
                                                         ifelse(india.1$ethnicity == "Bengali,Hindi,Kashmiri,Marathi,Punjabi,Kannadiga,Malayali",1,
                                                                ifelse(india.1$ethnicity == "Kashmiri",1,0))))))


india.1$ethnicitykonkani <- ifelse(india.1$ethnicity == "Assamese,Bengali,Gujarati,Hindi,Kashmiri,Konkani,Marathi,Punjabi,Kannadiga,Malayali,Tamil,Telugu,Tulu",1,
                                   ifelse(india.1$ethnicity == "Bengali,Hindi,Kashmiri,Konkani,Marathi,Kannadiga,Malayali",1,
                                          ifelse(india.1$ethnicity == "Bengali,Hindi,Kashmiri,Marathi,Punjabi,Kannadiga,Malayali",1,
                                                 ifelse(india.1$ethnicity == "Bengali,Hindi,Konkani,Punjabi",1,
                                                        ifelse(india.1$ethnicity == "Gujarati,Hindi,Konkani,Marathi",1,
                                                               ifelse(india.1$ethnicity == "Hindi,Konkani,Marathi",1,
                                                                      ifelse(india.1$ethnicity == "Konkani",1,
                                                                             ifelse(india.1$ethnicity == "Konkani,Marathi",1,0))))))))


india.1$ethnicitymalayali <- ifelse(india.1$ethnicity == "Assamese,Bengali,Gujarati,Hindi,Kashmiri,Konkani,Marathi,Punjabi,Kannadiga,Malayali,Tamil,Telugu,Tulu",1,
                                    ifelse(india.1$ethnicity == "Assamese,Gujarati,Kashmiri,Marathi,Malayali",1,
                                           ifelse(india.1$ethnicity == "Bengali,Hindi,Kashmiri,Konkani,Marathi,Kannadiga,Malayali",1,
                                                  ifelse(india.1$ethnicity == "Bengali,Hindi,Kashmiri,Marathi,Punjabi,Kannadiga,Malayali",1,
                                                         ifelse(india.1$ethnicity == "Bengali,Hindi,Malayali",1,
                                                                ifelse(india.1$ethnicity == "Gujarati,Hindi,Malayali",1,
                                                                       ifelse(india.1$ethnicity == "Malayali",1,
                                                                              ifelse(india.1$ethnicity == "Malayali,Tamil",1,0))))))))


india.1$ethnicitymarathi <- ifelse(india.1$ethnicity == "Assamese,Gujarati,Kashmiri,Marathi,Malayali",1,
                                   ifelse(india.1$ethnicity == "Bengali,Gujarati,Kashmiri,Marathi",1,
                                          ifelse(india.1$ethnicity == "Bengali,Hindi,Kashmiri,Konkani,Marathi,Kannadiga,Malayali",1,
                                                 ifelse(india.1$ethnicity == "Bengali,Hindi,Kashmiri,Marathi,Punjabi,Kannadiga,Malayali",1,
                                                        ifelse(india.1$ethnicity == "Bengali,Hindi,Marathi,Kannadiga",1,
                                                               ifelse(india.1$ethnicity == "Bengali,Marathi",1,
                                                                      ifelse(india.1$ethnicity == "Gujarati,Hindi,Konkani,Marathi",1,
                                                                             ifelse(india.1$ethnicity == "Gujarati,Hindi,Marathi,Punjabi",1,
                                                                                    ifelse(india.1$ethnicity == "Hindi,Konkani,Marathi",1,
                                                                                           ifelse(india.1$ethnicity == "Hindi,Marathi",1,
                                                                                                  ifelse(india.1$ethnicity == "Hindi,Marathi,Kannadiga",1,
                                                                                                         ifelse(india.1$ethnicity == "Hindi,Marathi,Punjabi",1,
                                                                                                                ifelse(india.1$ethnicity == "Konkani,Marathi",1,
                                                                                                                       ifelse(india.1$ethnicity == "Marathi",1,
                                                                                                                              0))))))))))))))


india.1$ethnicityother <- ifelse(india.1$ethnicity == "Assamese,Bengali,Gujarati,Hindi,Kashmiri,Konkani,Marathi,Punjabi,Kannadiga,Malayali,Tamil,Telugu,Tulu",1,
                                 ifelse(india.1$ethnicity == "Assamese,Bengali,Hindi,Other",1,
                                        ifelse(india.1$ethnicity == "Assamese,Hindi,Other",1,
                                               ifelse(india.1$ethnicity == "Hindi,Other",1,
                                                      ifelse(india.1$ethnicity == "Hindi,Telugu,Other",1,
                                                             ifelse(india.1$ethnicity == "Kannadiga,Tulu",1,
                                                                    ifelse(india.1$ethnicity == "Other",1,0)))))))


india.1$ethnicitypunjabi <- ifelse(india.1$ethnicity == "Assamese,Bengali,Gujarati,Hindi,Kashmiri,Konkani,Marathi,Punjabi,Kannadiga,Malayali,Tamil,Telugu,Tulu",1,
                                   ifelse(india.1$ethnicity == "Bengali,Hindi,Kashmiri,Marathi,Punjabi,Kannadiga,Malayali",1,
                                          ifelse(india.1$ethnicity == "Bengali,Hindi,Konkani,Punjabi",1,
                                                 ifelse(india.1$ethnicity == "Bengali,Hindi,Punjabi",1,
                                                        ifelse(india.1$ethnicity == "Gujarati,Hindi,Marathi,Punjabi",1,
                                                               ifelse(india.1$ethnicity == "Gujarati,Hindi,Punjabi",1,
                                                                      ifelse(india.1$ethnicity == "Hindi,Marathi,Punjabi",1,
                                                                             ifelse(india.1$ethnicity == "Hindi,Punjabi",1,
                                                                                    ifelse(india.1$ethnicity == "Punjabi",1,0)))))))))



india.1$ethnicitytamil <- ifelse(india.1$ethnicity == "Assamese,Bengali,Gujarati,Hindi,Kashmiri,Konkani,Marathi,Punjabi,Kannadiga,Malayali,Tamil,Telugu,Tulu",1,
                                 ifelse(india.1$ethnicity == "Bengali,Hindi,Tamil",1,
                                        ifelse(india.1$ethnicity == "Hindi,Tamil",1,
                                               ifelse(india.1$ethnicity == "Hindi,Tamil,Telugu",1,
                                                      ifelse(india.1$ethnicity == "Malayali,Tamil",1,
                                                             ifelse(india.1$ethnicity == "Tamil",1,
                                                                    ifelse(india.1$ethnicity == "Tamil,Telugu",1,0)))))))



india.1$ethnicitytelugu <- ifelse(india.1$ethnicity == "Assamese,Bengali,Gujarati,Hindi,Kashmiri,Konkani,Marathi,Punjabi,Kannadiga,Malayali,Tamil,Telugu,Tulu",1,
                                  ifelse(india.1$ethnicity == "Hindi,Tamil,Telugu",1,
                                         ifelse(india.1$ethnicity == "Hindi,Telugu,Other",1,
                                                ifelse(india.1$ethnicity == "Kannadiga,Telugu",1,
                                                       ifelse(india.1$ethnicity == "Tamil,Telugu",1,
                                                              ifelse(india.1$ethnicity == "Telugu",1,0))))))












summary(mod.contributepk.india.1.hetethnicity <- lm(contributePK ~ female_treat*ethnicityassamese + female_treat*ethnicitybengali
                                                    + female_treat*ethnicitygujarati + female_treat*ethnicitytelugu
                                                    + female_treat*ethnicitykashmiri + female_treat*ethnicitykonkani + female_treat*ethnicitymalayali
                                                    + female_treat*ethnicitypunjabi  + female_treat*ethnicitytamil + female_treat*ethnicitykannadiga
                                                    + female_treat*ethnicityother, data=india.1 ))
summary(mod.contributemoney.india.1.hetethnicity <- lm(contributemoney ~ female_treat*ethnicityassamese + female_treat*ethnicitybengali
                                                       + female_treat*ethnicitygujarati + female_treat*ethnicitytelugu
                                                       + female_treat*ethnicitykashmiri + female_treat*ethnicitykonkani + female_treat*ethnicitymalayali
                                                       + female_treat*ethnicitypunjabi  + female_treat*ethnicitytamil + female_treat*ethnicitykannadiga
                                                       + female_treat*ethnicityother, data=india.1 ))

summary(mod.sexism.india.1.hetethnicity <- lm(moreoverallsexism~ female_treat*ethnicityassamese + female_treat*ethnicitybengali
                                              + female_treat*ethnicitygujarati + female_treat*ethnicitytelugu
                                              + female_treat*ethnicitykashmiri + female_treat*ethnicitykonkani + female_treat*ethnicitymalayali
                                              + female_treat*ethnicitypunjabi  + female_treat*ethnicitytamil + female_treat*ethnicitykannadiga
                                              + female_treat*ethnicityother, data=india.1 ))




stargazer(mod.contributepk.india.1.hetethnicity,mod.contributemoney.india.1.hetethnicity,
          mod.sexism.india.1.hetethnicity, digits=2)










#South Africa 1#


#########By Respondent Gender#######
south.africa.1$womanrespondent <- ifelse(south.africa.1$gender=="Woman",1,0)

summary(mod.contributepk.south.africa.1.hetwomen <- lm(contributePK ~ female_treat*womanrespondent, data=south.africa.1 ))
summary(mod.contributemoney.south.africa.1.hetwomen  <- lm(contributemoney ~ female_treat*womanrespondent, data=south.africa.1 ))

summary(mod.sexism.south.africa.1.hetwomen  <- lm(moreoverallsexism ~ female_treat*womanrespondent, data=south.africa.1 ))

stargazer(mod.contributepk.south.africa.1.hetwomen,mod.contributemoney.south.africa.1.hetwomen,
          mod.sexism.south.africa.1.hetwomen, digits=2)


#####By Sexism#####
summary(mod.contributepk.south.africa.1.hetsexism <- lm(contributePK ~ female_treat*moreoverallsexism, data=south.africa.1 ))
summary(mod.contributemoney.south.africa.1.hetsexism <- lm(contributemoney ~ female_treat*moreoverallsexism, data=south.africa.1 ))

stargazer(mod.contributepk.south.africa.1.hetsexism ,mod.contributemoney.south.africa.1.hetsexism, digits=2)




##By Age##
summary(mod.contributepk.south.africa.1.hetage <- lm(contributePK ~ female_treat*age, data=south.africa.1 ))
summary(mod.contributemoney.south.africa.1.hetage <- lm(contributemoney ~ female_treat*age, data=south.africa.1 ))

summary(mod.sexism.south.africa.1.hetage <- lm(moreoverallsexism~ female_treat*age, data=south.africa.1 ))


stargazer(mod.contributepk.south.africa.1.hetage,mod.contributemoney.south.africa.1.hetage,
          mod.sexism.south.africa.1.hetage, digits=2)





####By Party###
summary(mod.contributepk.south.africa.1.hetparty <- lm(contributePK ~ female_treat*as.numeric(partywarmth_1) +  female_treat*as.numeric(partywarmth_2) + female_treat*as.numeric(partywarmth_3), data=south.africa.1 ))
summary(mod.contributemoney.south.africa.1.hetparty <- lm(contributemoney ~ female_treat*as.numeric(partywarmth_1)+  female_treat*as.numeric(partywarmth_2)+ female_treat*as.numeric(partywarmth_3), data=south.africa.1 ))

summary(mod.sexism.south.africa.1.hetparty <- lm(moreoverallsexism~ female_treat*as.numeric(partywarmth_1)+  female_treat*as.numeric(partywarmth_2)+ female_treat*as.numeric(partywarmth_3), data=south.africa.1 ))


stargazer(mod.contributepk.south.africa.1.hetparty,mod.contributemoney.south.africa.1.hetparty,
          mod.sexism.south.africa.1.hetparty, digits=2)



###By PK Knowledge###
summary(mod.contributepk.south.africa.1.hetpkknow <- lm(contributePK ~ female_treat*pknowledge, data=south.africa.1 ))
summary(mod.contributemoney.south.africa.1.hetpkknow <- lm(contributemoney ~ female_treat*pknowledge, data=south.africa.1 ))

summary(mod.sexism.south.africa.1.hetpkknow <- lm(moreoverallsexism~ female_treat*pknowledge, data=south.africa.1 ))


stargazer(mod.contributepk.south.africa.1.hetpkknow,mod.contributemoney.south.africa.1.hetpkknow,
          mod.sexism.south.africa.1.hetpkknow, digits=2)






###By PK Knowledge Choice###
summary(mod.contributepk.south.africa.1.hetsc <- lm(contributePK ~ female_treat*as.factor(securitycouncil), data=south.africa.1 ))
summary(mod.contributemoney.south.africa.1.hetsc<- lm(contributemoney ~ female_treat*as.factor(securitycouncil), data=south.africa.1 ))

summary(mod.sexism.south.africa.1.hetsc <- lm(moreoverallsexism~ female_treat*as.factor(securitycouncil), data=south.africa.1 ))


stargazer(mod.contributepk.south.africa.1.hetsc,mod.contributemoney.south.africa.1.hetsc,
          mod.sexism.south.africa.1.hetsc, digits=2)




###By Urban Rural###
summary(mod.contributepk.south.africa.1.heturban <- lm(contributePK ~ female_treat*as.factor(ruralurban), data=south.africa.1 ))
summary(mod.contributemoney.south.africa.1.heturban <- lm(contributemoney ~ female_treat*as.factor(ruralurban), data=south.africa.1 ))

summary(mod.sexism.south.africa.1.heturban <- lm(moreoverallsexism~ female_treat*as.factor(ruralurban), data=south.africa.1 ))



stargazer(mod.contributepk.south.africa.1.heturban,mod.contributemoney.south.africa.1.heturban,
          mod.sexism.south.africa.1.heturban, digits=2)






##By religion
summary(mod.contributepk.south.africa.1.hetreligion <- lm(contributePK ~ female_treat*as.factor(religion), data=south.africa.1 ))
summary(mod.contributemoney.south.africa.1.hetreligion <- lm(contributemoney ~ female_treat*as.factor(religion), data=south.africa.1 ))

summary(mod.sexism.south.africa.1.hetreligion <- lm(moreoverallsexism~ female_treat*as.factor(religion), data=south.africa.1 ))



stargazer(mod.contributepk.south.africa.1.hetreligion,mod.contributemoney.south.africa.1.hetreligion,
          mod.sexism.south.africa.1.hetreligion, digits=2)







##By Mother tongue##

###Code individual languages##
table(south.africa.1$language)
prop.table(table(south.africa.1$language))
south.africa.1$firstlanguage_Afrikaans <- ifelse(south.africa.1$language == "Afrikaans",1,
                                                 ifelse(south.africa.1$language == "Afrikaans,English",1,
                                                        ifelse(south.africa.1$language == "Afrikaans,English,Pedi,Tswana,Xhosa,Zulu",1,
                                                               ifelse(south.africa.1$language == "Afrikaans,English,Sotho,Swati,Tswana,Venda,Zulu",1,
                                                                      ifelse(south.africa.1$language == "Afrikaans,English,Tswana",1,
                                                                             ifelse(south.africa.1$language == "Afrikaans,English,Xhosa",1,
                                                                                    ifelse(south.africa.1$language == "Afrikaans,English,Xhosa,Zulu",1,
                                                                                           ifelse(south.africa.1$language == "Afrikaans,English,Zulu",1,
                                                                                                  ifelse(south.africa.1$language == "Afrikaans,Tswana",1,
                                                                                                         ifelse(south.africa.1$language == "Afrikaans,Xhosa",1,0))))))))))
summary(south.africa.1$firstlanguage_Afrikaans)

south.africa.1$firstlanguage_English <- ifelse(south.africa.1$language == "Afrikaans,English", 1,
                                               ifelse(south.africa.1$language == "Afrikaans,English,Pedi,Tswana,Xhosa,Zulu", 1,
                                                      ifelse(south.africa.1$language == "Afrikaans,English,Sotho,Swati,Tswana,Venda,Zulu", 1,
                                                             ifelse(south.africa.1$language == "Afrikaans,English,Tswana", 1,
                                                                    ifelse(south.africa.1$language == "Afrikaans,English,Xhosa", 1,
                                                                           ifelse(south.africa.1$language == "Afrikaans,English,Xhosa,Zulu", 1,
                                                                                  ifelse(south.africa.1$language == "Afrikaans,English,Zulu ", 1,
                                                                                         ifelse(south.africa.1$language == "English", 1,
                                                                                                ifelse(south.africa.1$language == "English,Ndebele", 1,
                                                                                                       ifelse(south.africa.1$language == "English,Ndebele,Pedi,Sotho,Xhosa,Zulu", 1,
                                                                                                              ifelse(south.africa.1$language == "English,Ndebele,Pedi,Sotho,Zulu", 1,
                                                                                                                     ifelse(south.africa.1$language == "English,Other", 1,
                                                                                                                            ifelse(south.africa.1$language == "English,Sotho", 1,
                                                                                                                                   ifelse(south.africa.1$language == "English,Sotho,Tswana", 1,
                                                                                                                                          ifelse(south.africa.1$language == "English,Sotho,Tswana,Zulu", 1,
                                                                                                                                                 ifelse(south.africa.1$language == "English,Sotho,Xhosa,Zulu", 1,
                                                                                                                                                        ifelse(south.africa.1$language == "English,Tswana", 1,
                                                                                                                                                               ifelse(south.africa.1$language == "English,Venda", 1,
                                                                                                                                                                      ifelse(south.africa.1$language == "English,Xhosa", 1,
                                                                                                                                                                             ifelse(south.africa.1$language == "English,Xhosa,Zulu ", 1,
                                                                                                                                                                                    ifelse(south.africa.1$language == "English,Zulu", 1,
                                                                                                                                                                                           0)))))))))))))))))))))

summary(south.africa.1$firstlanguage_English) ##55 percent- way higher than national average (9.6%), but likely bc a lot had english alongside another language 

south.africa.1$firstlanguage_Pedi<- ifelse(south.africa.1$language == "Afrikaans,English,Pedi,Tswana,Xhosa,Zulu",1,
                                           ifelse(south.africa.1$language == "English,Ndebele,Pedi,Sotho,Zulu",1,
                                                  ifelse(south.africa.1$language == "English,Ndebele,Pedi,Sotho,Xhosa,Zulu",1,
                                                         ifelse(south.africa.1$language == "Ndebele,Pedi ",1,
                                                                ifelse(south.africa.1$language == "Pedi",1,
                                                                       ifelse(south.africa.1$language == "Pedi,Sotho",1,
                                                                              ifelse(south.africa.1$language == "Pedi,Sotho,Zulu",1,
                                                                                     ifelse(south.africa.1$language == "Pedi,Tsonga",1,
                                                                                            ifelse(south.africa.1$language == "Pedi,Tswana",1,
                                                                                                   ifelse(south.africa.1$language == "Pedi,Zulu",1,0))))))))))


summary(south.africa.1$firstlanguage_Pedi) #4.5% (9% national)

south.africa.1$firstlanguage_Tswana <- ifelse(south.africa.1$language == "Afrikaans,English,Pedi,Tswana,Xhosa,Zulu", 1,
                                              ifelse(south.africa.1$language == "Afrikaans,English,Sotho,Swati,Tswana,Venda,Zulu", 1,
                                                     ifelse(south.africa.1$language == "Afrikaans,English,Tswana", 1,
                                                            ifelse(south.africa.1$language == "Afrikaans,Tswana", 1,
                                                                   ifelse(south.africa.1$language == "English,Sotho,Tswana", 1,
                                                                          ifelse(south.africa.1$language == "English,Sotho,Tswana,Zulu", 1,
                                                                                 ifelse(south.africa.1$language == "English,Tswana", 1,
                                                                                        ifelse(south.africa.1$language == "Ndebele,Tsonga,Zulu", 1,
                                                                                               ifelse(south.africa.1$language == "Ndebele,Tswana", 1,
                                                                                                      ifelse(south.africa.1$language == "Pedi,Tswana", 1,
                                                                                                             ifelse(south.africa.1$language == "Tswana", 1,0)))))))))))
summary(south.africa.1$firstlanguage_Tswana) #4.6% (8% national)

south.africa.1$firstlanguage_Xhosa<- ifelse(south.africa.1$language == "Afrikaans,English,Pedi,Tswana,Xhosa,Zulu", 1,
                                            ifelse(south.africa.1$language == "Afrikaans,English,Xhosa", 1,
                                                   ifelse(south.africa.1$language == "Afrikaans,English,Xhosa,Zulu", 1,
                                                          ifelse(south.africa.1$language == "Afrikaans,Xhosa", 1,
                                                                 ifelse(south.africa.1$language == "English,Ndebele,Pedi,Sotho,Xhosa,Zulu", 1,
                                                                        ifelse(south.africa.1$language == "English,Sotho,Xhosa,Zulu", 1,
                                                                               ifelse(south.africa.1$language == "English,Xhosa", 1,
                                                                                      ifelse(south.africa.1$language == "English,Xhosa,Zulu", 1,
                                                                                             ifelse(south.africa.1$language == "Sotho,Xhosa", 1,
                                                                                                    ifelse(south.africa.1$language == "Xhosa", 1,
                                                                                                           ifelse(south.africa.1$language == "Xhosa,Zulu", 1,0)))))))))))

summary(south.africa.1$firstlanguage_Xhosa) #8.9% (16% national)

south.africa.1$firstlanguage_Zulu<- ifelse(south.africa.1$language == "Afrikaans,English,Pedi,Tswana,Xhosa,Zulu", 1,
                                           ifelse(south.africa.1$language == "Afrikaans,English,Sotho,Swati,Tswana,Venda,Zulu", 1,
                                                  ifelse(south.africa.1$language == "Afrikaans,English,Xhosa,Zulu", 1,
                                                         ifelse(south.africa.1$language == "Afrikaans,English,Zulu", 1,
                                                                ifelse(south.africa.1$language == "English,Ndebele,Pedi,Sotho,Xhosa,Zulu", 1,
                                                                       ifelse(south.africa.1$language == "English,Ndebele,Pedi,Sotho,Zulu", 1,
                                                                              ifelse(south.africa.1$language == "English,Sotho,Tswana,Zulu", 1,
                                                                                     ifelse(south.africa.1$language == "English,Sotho,Xhosa,Zulu", 1,
                                                                                            ifelse(south.africa.1$language == "English,Xhosa,Zulu", 1,
                                                                                                   ifelse(south.africa.1$language == "English,Zulu", 1,
                                                                                                          ifelse(south.africa.1$language == "Ndebele,Swati,Zulu", 1,
                                                                                                                 ifelse(south.africa.1$language == "Ndebele,Tsonga,Zulu", 1,
                                                                                                                        ifelse(south.africa.1$language == "Pedi,Sotho,Zulu", 1,
                                                                                                                               ifelse(south.africa.1$language == "Pedi,Zulu", 1,
                                                                                                                                      ifelse(south.africa.1$language == "Swati,Zulu", 1,
                                                                                                                                             ifelse(south.africa.1$language == "Xhosa,Zulu", 1,
                                                                                                                                                    ifelse(south.africa.1$language == "Zulu", 1,0)))))))))))))))))
summary(south.africa.1$firstlanguage_Zulu) #14 (22.7% national)

south.africa.1$firstlanguage_Sotho<- ifelse(south.africa.1$language == "Afrikaans,English,Sotho,Swati,Tswana,Venda,Zulu", 1,
                                            ifelse(south.africa.1$language == "English,Ndebele,Pedi,Sotho,Xhosa,Zulu", 1,
                                                   ifelse(south.africa.1$language == "English,Ndebele,Pedi,Sotho,Zulu", 1,
                                                          ifelse(south.africa.1$language == "English,Sotho", 1,
                                                                 ifelse(south.africa.1$language == "English,Sotho,Tswana", 1,
                                                                        ifelse(south.africa.1$language == "English,Sotho,Tswana,Zulu", 1,
                                                                               ifelse(south.africa.1$language == "English,Sotho,Xhosa,Zulu", 1,
                                                                                      ifelse(south.africa.1$language == "Pedi,Sotho", 1,
                                                                                             ifelse(south.africa.1$language == "Pedi,Sotho,Zulu", 1,
                                                                                                    ifelse(south.africa.1$language == "Sotho", 1,
                                                                                                           ifelse(south.africa.1$language == "Sotho,Xhosa", 1,
                                                                                                                  ifelse(south.africa.1$language == "Sotho,Zulu", 1,0))))))))))))
summary(south.africa.1$firstlanguage_Sotho) #5% (8% nationally)

south.africa.1$firstlanguage_Swati<- ifelse(south.africa.1$language == "Afrikaans,English,Sotho,Swati,Tswana,Venda,Zulu", 1,
                                            ifelse(south.africa.1$language == "Ndebele,Swati,Zulu", 1,
                                                   ifelse(south.africa.1$language == "Swati", 1,
                                                          ifelse(south.africa.1$language == "Swati,Tsonga", 1,
                                                                 ifelse(south.africa.1$language == "Swati,Zulu", 1,0)))))
summary(south.africa.1$firstlanguage_Swati) #1.5% (2.5% nationally)

south.africa.1$firstlanguage_Venda<- ifelse(south.africa.1$language == "English,Venda", 1,
                                            ifelse(south.africa.1$language == "Ndebele,Venda", 1,
                                                   ifelse(south.africa.1$language == "Tsonga,Venda", 1,
                                                          ifelse(south.africa.1$language == "Venda", 1,0))))
summary(south.africa.1$firstlanguage_Venda) #1.8% (2.4% national)

south.africa.1$firstlanguage_Tsonga<- ifelse(south.africa.1$language == "Ndebele,Tsonga,Zulu", 1,
                                             ifelse(south.africa.1$language == "Pedi,Tsonga", 1,
                                                    ifelse(south.africa.1$language == "Swati,Tsonga", 1,
                                                           ifelse(south.africa.1$language == "Tsonga", 1,
                                                                  ifelse(south.africa.1$language == "Tsonga,Venda", 1,0)))))
summary(south.africa.1$firstlanguage_Tsonga) #2.1% (4.5% national)

south.africa.1$firstlanguage_Ndebele<- ifelse(south.africa.1$language == "English,Ndebele", 1,
                                              ifelse(south.africa.1$language == "English,Ndebele,Pedi,Sotho,Xhosa,Zulu", 1,
                                                     ifelse(south.africa.1$language == "English,Ndebele,Pedi,Sotho,Zulu", 1,
                                                            ifelse(south.africa.1$language == "Ndebele", 1,
                                                                   ifelse(south.africa.1$language == "Ndebele,Pedi", 1,
                                                                          ifelse(south.africa.1$language == "Ndebele,Swati,Zulu", 1,
                                                                                 ifelse(south.africa.1$language == "Ndebele,Tsonga,Zulu", 1,
                                                                                        ifelse(south.africa.1$language == "Ndebele,Tswana", 1,
                                                                                               ifelse(south.africa.1$language == "Ndebele,Venda", 1,0)))))))))
summary(south.africa.1$firstlanguage_Ndebele) #1.7 (national 2%)

south.africa.1$firstlanguage_Other<- ifelse(south.africa.1$language == "English,Other", 1,
                                            ifelse(south.africa.1$language == "Other", 1,0))
summary(south.africa.1$firstlanguage_Other) #1.3%

south.africa.1$firstlanguage_Africanlanguage <- ifelse(south.africa.1$firstlanguage_Ndebele == 1,1,
                                                       ifelse(south.africa.1$firstlanguage_Xhosa == 1,1,
                                                              ifelse(south.africa.1$firstlanguage_Zulu == 1,1,
                                                                     ifelse(south.africa.1$firstlanguage_Swati == 1,1,
                                                                            ifelse(south.africa.1$firstlanguage_Tsonga == 1,1,
                                                                                   ifelse(south.africa.1$firstlanguage_Sotho == 1,1,
                                                                                          ifelse(south.africa.1$firstlanguage_Tswana == 1,1,
                                                                                                 ifelse(south.africa.1$firstlanguage_Venda == 1,1,
                                                                                                        ifelse(south.africa.1$firstlanguage_Pedi == 1,1,0)))))))))

summary(south.africa.1$firstlanguage_Africanlanguage) #40% -lower than I'd expect. saying that 60% speak Afrikaans or English as their only first language

south.africa.1$firstlanguage_AfrikaansorEnglishonly <- ifelse(south.africa.1$language == "Afrikaans",1,
                                                              ifelse(south.africa.1$language == "Afrikaans,English",1,
                                                                     ifelse(south.africa.1$language == "English",1,0)))
summary(south.africa.1$firstlanguage_AfrikaansorEnglishonly) #59%



#African Language Dichot
summary(mod.contributepk.south.africa.1.hetafricanlanguage <- lm(contributePK ~ female_treat*firstlanguage_Africanlanguage, data=south.africa.1 ))
summary(mod.contributemoney.south.africa.1.hetafricanlanguage <- lm(contributemoney ~ female_treat*firstlanguage_Africanlanguage, data=south.africa.1 ))

summary(mod.sexism.south.africa.1.hetafricanlanguage <- lm(moreoverallsexism~ female_treat*firstlanguage_Africanlanguage, data=south.africa.1 ))



stargazer(mod.contributepk.south.africa.1.hetafricanlanguage,mod.contributemoney.south.africa.1.hetafricanlanguage,
          mod.sexism.south.africa.1.hetafricanlanguage, digits=2)






#All Languages 
summary(mod.contributepk.south.africa.1.hetalllanguage <- lm(contributePK ~ female_treat*firstlanguage_Afrikaans + female_treat*firstlanguage_AfrikaansorEnglishonly
                                                             + female_treat*firstlanguage_Ndebele  + female_treat*firstlanguage_Other  + female_treat*firstlanguage_Pedi 
                                                             + female_treat*firstlanguage_Sotho  + female_treat*firstlanguage_Swati +  + female_treat*firstlanguage_Tsonga
                                                             + female_treat*firstlanguage_Tswana  + female_treat*firstlanguage_Venda  + female_treat*firstlanguage_Xhosa 
                                                             + female_treat*firstlanguage_Zulu, data=south.africa.1 ))
summary(mod.contributemoney.south.africa.1.hetalllanguage <- lm(contributemoney ~female_treat*firstlanguage_Afrikaans + female_treat*firstlanguage_AfrikaansorEnglishonly
                                                                + female_treat*firstlanguage_Ndebele  + female_treat*firstlanguage_Other  + female_treat*firstlanguage_Pedi 
                                                                + female_treat*firstlanguage_Sotho  + female_treat*firstlanguage_Swati +  + female_treat*firstlanguage_Tsonga
                                                                + female_treat*firstlanguage_Tswana  + female_treat*firstlanguage_Venda  + female_treat*firstlanguage_Xhosa 
                                                                + female_treat*firstlanguage_Zulu, data=south.africa.1 ))

summary(mod.sexism.south.africa.1.hetalllanguage <- lm(moreoverallsexism~ female_treat*firstlanguage_Afrikaans + female_treat*firstlanguage_AfrikaansorEnglishonly
                                                       + female_treat*firstlanguage_Ndebele  + female_treat*firstlanguage_Other  + female_treat*firstlanguage_Pedi 
                                                       + female_treat*firstlanguage_Sotho  + female_treat*firstlanguage_Swati +  + female_treat*firstlanguage_Tsonga
                                                       + female_treat*firstlanguage_Tswana  + female_treat*firstlanguage_Venda  + female_treat*firstlanguage_Xhosa 
                                                       + female_treat*firstlanguage_Zulu, data=south.africa.1 ))

stargazer(mod.contributepk.south.africa.1.hetalllanguage,mod.contributemoney.south.africa.1.hetalllanguage,
          mod.sexism.south.africa.1.hetalllanguage, digits=2)








##India 2 ## 

#########By Respondent Gender#######
india.2$womanrespondent <- ifelse(india.2$gender=="Woman",1,0)

summary(mod.contributepk.india.2.hetwomen <- lm(contributePK ~ female_treat*womanrespondent, data=india.2 ))
summary(mod.contributemoney.india.2.hetwomen  <- lm(contributemoney ~ female_treat*womanrespondent, data=india.2 ))

summary(mod.angry.india.2.hetangry <- lm(angry ~ female_treat*womanrespondent, data=india.2 ))
summary(mod.sad.india.2.hetsad <- lm(sad ~ female_treat*womanrespondent*womanrespondent, data=india.2 ))
summary(mod.mistake.india.2.hetmistake <- lm(mistake_tosend ~ female_treat*womanrespondent, data=india.2 ))


summary(mod.sexism.india.2.hetwomen  <- lm(moreoverallsexism ~ female_treat*womanrespondent, data=india.2 ))


stargazer(mod.contributepk.india.2.hetwomen,mod.contributemoney.india.2.hetwomen,
          mod.angry.india.2.hetangry,mod.sad.india.2.hetsad,mod.mistake.india.2.hetmistake,mod.sexism.india.2.hetwomen, digits=2)



#####By Sexism#####
summary(mod.contributepk.india.2.hethostsex <- lm(contributePK ~ female_treat*moreoverallsexism, data=india.2 ))
summary(mod.contributemoney.india.2.hethostsex <- lm(contributemoney ~ female_treat*moreoverallsexism, data=india.2 ))

summary(mod.angry.india.2.hethostsex <- lm(angry ~ female_treat*moreoverallsexism, data=india.2 ))
summary(mod.sad.india.2.hethostsex <- lm(sad ~ female_treat*moreoverallsexism, data=india.2 ))
summary(mod.mistake.india.2.hethostsex<- lm(mistake_tosend ~ female_treat*moreoverallsexism, data=india.2 ))


stargazer(mod.contributepk.india.2.hethostsex,mod.contributemoney.india.2.hethostsex,
          mod.angry.india.2.hethostsex,mod.sad.india.2.hethostsex,mod.mistake.india.2.hethostsex,digits=2)





##By Age##
summary(mod.contributepk.india.2.hetage <- lm(contributePK ~ female_treat*age, data=india.2 ))
summary(mod.contributemoney.india.2.hetage <- lm(contributemoney ~ female_treat*age, data=india.2 ))


summary(mod.angry.india.2.hetage <- lm(angry ~ female_treat*age, data=india.2 ))
summary(mod.sad.india.2.hetage <- lm(sad ~ female_treat*age, data=india.2 ))
summary(mod.mistake.india.2.hetage <- lm(mistake_tosend ~ female_treat*age, data=india.2 ))


summary(mod.sexism.india.2.hetage <- lm(moreoverallsexism~ female_treat*age, data=india.2 ))


stargazer(mod.contributepk.india.2.hetage,mod.contributemoney.india.2.hetage,
          mod.angry.india.2.hetage,mod.sad.india.2.hetage,mod.mistake.india.2.hetage,mod.sexism.india.2.hetage, digits=2)




####By Party###
summary(mod.contributepk.india.2.hetparty <- lm(contributePK ~ female_treat*as.numeric(partywarmth_1) +  female_treat*as.numeric(partywarmth_2), data=india.2 ))
summary(mod.contributemoney.india.2.hetparty <- lm(contributemoney ~ female_treat*as.numeric(partywarmth_1)+  female_treat*as.numeric(partywarmth_2), data=india.2 ))

summary(mod.angry.india.2.hetparty <- lm(angry ~ female_treat*as.numeric(partywarmth_1) +  female_treat*as.numeric(partywarmth_2), data=india.2 ))
summary(mod.sad.india.2.hetparty <- lm(sad ~ female_treat*as.numeric(partywarmth_1) +  female_treat*as.numeric(partywarmth_2), data=india.2 ))
summary(mod.mistake.india.2.hetparty <- lm(mistake_tosend ~ female_treat*as.numeric(partywarmth_1) +  female_treat*as.numeric(partywarmth_2), data=india.2 ))

summary(mod.sexism.india.2.hetparty <- lm(moreoverallsexism~ female_treat*as.numeric(partywarmth_1)+  female_treat*as.numeric(partywarmth_2), data=india.2 ))


stargazer(mod.contributepk.india.2.hetparty,mod.contributemoney.india.2.hetparty,
          mod.angry.india.2.hetparty,mod.sad.india.2.hetparty,mod.mistake.india.2.hetparty, mod.sexism.india.2.hetparty, digits=2)




###By PK Knowledge###
summary(mod.contributepk.india.2.hetpkknow <- lm(contributePK ~ female_treat*pknowledge, data=india.2 ))
summary(mod.contributemoney.india.2.hetpkknow <- lm(contributemoney ~ female_treat*pknowledge, data=india.2 ))

summary(mod.angry.india.2.hetpkknow <- lm(angry ~ female_treat*pknowledge, data=india.2 ))
summary(mod.sad.india.2.hetpkknow <- lm(sad ~ female_treat*pknowledge, data=india.2 ))
summary(mod.mistake.india.2.hetpkknow <- lm(mistake_tosend ~ female_treat*pknowledge, data=india.2 ))


summary(mod.sexism.india.2.hetpkknow <- lm(moreoverallsexism~ female_treat*pknowledge, data=india.2 ))


stargazer(mod.contributepk.india.2.hetpkknow,mod.contributemoney.india.2.hetpkknow,
          mod.angry.india.2.hetpkknow,mod.sad.india.2.hetpkknow,mod.mistake.india.2.hetpkknow, mod.sexism.india.2.hetpkknow,digits=2)







###By PK Knowledge Choice###
summary(mod.contributepk.india.2.hetsc <- lm(contributePK ~ female_treat*as.factor(securitycouncil), data=india.2 ))
summary(mod.contributemoney.india.2.hetsc<- lm(contributemoney ~ female_treat*as.factor(securitycouncil), data=india.2 ))

summary(mod.angry.india.2.hetsc <- lm(angry ~ female_treat*as.factor(securitycouncil), data=india.2 ))
summary(mod.sad.india.2.hetsc <- lm(sad ~ female_treat*as.factor(securitycouncil), data=india.2 ))
summary(mod.mistake.india.2.hetsc <- lm(mistake_tosend ~ female_treat*as.factor(securitycouncil), data=india.2 ))


summary(mod.sexism.india.2.hetsc <- lm(moreoverallsexism~ female_treat*as.factor(securitycouncil), data=india.2 ))

stargazer(mod.contributepk.india.2.hetsc,mod.contributemoney.india.2.hetsc,
          mod.angry.india.2.hetsc,mod.sad.india.2.hetsc,mod.mistake.india.2.hetsc,mod.sexism.india.2.hetsc, digits=2)



###By Urban Rural###
summary(mod.contributepk.india.2.heturban <- lm(contributePK ~ female_treat*as.factor(ruralurban), data=india.2 ))
summary(mod.contributemoney.india.2.heturban <- lm(contributemoney ~ female_treat*as.factor(ruralurban), data=india.2 ))


summary(mod.angry.india.2.heturban <- lm(angry ~ female_treat*as.factor(ruralurban), data=india.2 ))
summary(mod.sad.india.2.heturban <- lm(sad ~ female_treat*as.factor(ruralurban), data=india.2 ))
summary(mod.mistake.india.2.heturban <- lm(mistake_tosend ~ female_treat*as.factor(ruralurban), data=india.2 ))

summary(mod.sexism.india.2.heturban <- lm(moreoverallsexism~ female_treat*as.factor(ruralurban), data=india.2 ))


stargazer(mod.contributepk.india.2.heturban,mod.contributemoney.india.2.heturban,
          mod.angry.india.2.heturban,mod.sad.india.2.heturban,mod.mistake.india.2.heturban,mod.sexism.india.2.heturban, digits=2)





##By religion
summary(mod.contributepk.india.2.hetreligion <- lm(contributePK ~ female_treat*as.factor(religion), data=india.2 ))
summary(mod.contributemoney.india.2.hetreligion <- lm(contributemoney ~ female_treat*as.factor(religion), data=india.2 ))

summary(mod.angry.india.2.hetreligion <- lm(angry ~ female_treat*as.factor(religion), data=india.2 ))
summary(mod.sad.india.2.hetreligion <- lm(sad ~ female_treat*as.factor(religion), data=india.2 ))
summary(mod.mistake.india.2.hetreligion <- lm(mistake_tosend ~ female_treat*as.factor(religion), data=india.2 ))


summary(mod.sexism.india.2.hetreligion <- lm(moreoverallsexism~ female_treat*as.factor(religion), data=india.2 ))

stargazer(mod.contributepk.india.2.hetreligion,mod.contributemoney.india.2.hetreligion,
          mod.angry.india.2.hetreligion,mod.sad.india.2.hetreligion,mod.mistake.india.2.hetreligion,mod.sexism.india.2.hetreligion, digits=2)








##By ethnicity

#Need to code ethnicity into categories#
table(india.2$ethnicity)

india.2$ethnicityassamese <- ifelse(india.2$ethnicity == "Assamese",1,
                                    ifelse(india.2$ethnicity == "Assamese,Bengali,Gujarati,Hindi,Malayali",1,
                                           ifelse(india.2$ethnicity == "Assamese,Bengali,Hindi",1,
                                                  ifelse(india.2$ethnicity == "Assamese,Hindi",1,0))))



india.2$ethnicitybengali <- ifelse(india.2$ethnicity == "Assamese,Bengali,Gujarati,Hindi,Malayali",1,
                                   ifelse(india.2$ethnicity == "Assamese,Bengali,Hindi",1,
                                          ifelse(india.2$ethnicity == "Bengali",1,
                                                 ifelse(india.2$ethnicity == "Bengali,Gujarati",1,
                                                        ifelse(india.2$ethnicity == "Bengali,Gujarati,Hindi",1,
                                                               ifelse(india.2$ethnicity == "Bengali,Hindi",1,
                                                                      ifelse(india.2$ethnicity == "Bengali,Hindi,Kannadiga",1,
                                                                             ifelse(india.2$ethnicity == "Bengali,Hindi,Punjabi",1,
                                                                                    ifelse(india.2$ethnicity == "Bengali,Hindi,Tamil",1,0)))))))))

india.2$ethnicitygujarati <- ifelse(india.2$ethnicity == "Assamese,Bengali,Gujarati,Hindi,Malayali",1,
                                    ifelse(india.2$ethnicity == "Bengali,Gujarati",1,
                                           ifelse(india.2$ethnicity == "Bengali,Gujarati,Hindi",1,
                                                  ifelse(india.2$ethnicity == "Gujarati",1,
                                                         ifelse(india.2$ethnicity == "Gujarati,Hindi",1,
                                                                ifelse(india.2$ethnicity == "Gujarati,Hindi,Malayali",1,
                                                                       ifelse(india.2$ethnicity == "Gujarati,Hindi,Marathi",1,
                                                                              ifelse(india.2$ethnicity == "Gujarati,Hindi,Punjabi",1,
                                                                                     ifelse(india.2$ethnicity == "Gujarati,Hindi,Tamil",1,
                                                                                            ifelse(india.2$ethnicity == "Gujarati,Hindi,Tamil,Telugu",1,
                                                                                                   ifelse(india.2$ethnicity == "Gujarati,Hindi,Telugu",1,0)))))))))))



india.2$ethnicityhindi <- ifelse(india.2$ethnicity == "Assamese,Bengali,Gujarati,Hindi,Malayali",1,
                                 ifelse(india.2$ethnicity == "Assamese,Bengali,Hindi",1,
                                        ifelse(india.2$ethnicity == "Assamese,Hindi",1,
                                               ifelse(india.2$ethnicity == "Bengali,Gujarati,Hindi",1,
                                                      ifelse(india.2$ethnicity == "Bengali,Hindi",1,
                                                             ifelse(india.2$ethnicity == "Bengali,Hindi,Kannadiga",1,
                                                                    ifelse(india.2$ethnicity == "Bengali,Hindi,Punjabi",1,
                                                                           ifelse(india.2$ethnicity == "Bengali,Hindi,Tamil",1,
                                                                                  ifelse(india.2$ethnicity == "Gujarati,Hindi",1,
                                                                                         ifelse(india.2$ethnicity == "Gujarati,Hindi,Malayali",1,
                                                                                                ifelse(india.2$ethnicity == "Gujarati,Hindi,Marathi",1,
                                                                                                       ifelse(india.2$ethnicity == "Gujarati,Hindi,Punjabi",1,
                                                                                                              ifelse(india.2$ethnicity == "Gujarati,Hindi,Tamil",1,
                                                                                                                     ifelse(india.2$ethnicity == "Gujarati,Hindi,Tamil,Telugu",1,
                                                                                                                            ifelse(india.2$ethnicity == "Gujarati,Hindi,Telugu",1,
                                                                                                                                   ifelse(india.2$ethnicity == "Hindi",1,
                                                                                                                                          ifelse(india.2$ethnicity == "Hindi,Kashmiri,Konkani",1,
                                                                                                                                                 ifelse(india.2$ethnicity == "Hindi,Kashmiri,Punjabi",1,
                                                                                                                                                        ifelse(india.2$ethnicity == "Hindi,Konkani,Kannadiga",1,
                                                                                                                                                               ifelse(india.2$ethnicity == "Hindi,Malayali",1,
                                                                                                                                                                      ifelse(india.2$ethnicity == "Hindi,Marathi",1,
                                                                                                                                                                             ifelse(india.2$ethnicity == "Hindi,Marathi,Kannadiga",1,
                                                                                                                                                                                    ifelse(india.2$ethnicity == "Hindi,Other",1,
                                                                                                                                                                                           ifelse(india.2$ethnicity == "Hindi,Punjabi",1,
                                                                                                                                                                                                  ifelse(india.2$ethnicity == "Hindi,Punjabi,Tamil",1,
                                                                                                                                                                                                         ifelse(india.2$ethnicity == "Hindi,Punjabi,Telugu",1,
                                                                                                                                                                                                                ifelse(india.2$ethnicity == "Hindi,Tamil",1,
                                                                                                                                                                                                                       ifelse(india.2$ethnicity == "Hindi,Tamil,Telugu",1,
                                                                                                                                                                                                                              ifelse(india.2$ethnicity == "Hindi,Telugu",1,
                                                                                                                                                                                                                                     ifelse(india.2$ethnicity == "Hindi,Telugu,Other",1,0))))))))))))))))))))))))))))))                                                                                                       


india.2$ethnicitykannadiga <- ifelse(india.2$ethnicity == "Bengali,Hindi,Kannadiga",1,
                                     ifelse(india.2$ethnicity == "Hindi,Konkani,Kannadiga",1,
                                            ifelse(india.2$ethnicity == "Hindi,Marathi,Kannadiga",1,
                                                   ifelse(india.2$ethnicity == "Kannadiga",1,
                                                          ifelse(india.2$ethnicity == "Kannadiga,Malayali,Other",1,0)))))

india.2$ethnicitykashmiri <- ifelse(india.2$ethnicity == "Hindi,Kashmiri,Konkani",1,
                                    ifelse(india.2$ethnicity == "Hindi,Kashmiri,Punjabi",1,
                                           ifelse(india.2$ethnicity == "Kashmiri",1,0)))



india.2$ethnicitymalayali <- ifelse(india.2$ethnicity == "Assamese,Bengali,Gujarati,Hindi,Malayali",1,
                                    ifelse(india.2$ethnicity == "Gujarati,Hindi,Malayali",1,
                                           ifelse(india.2$ethnicity == "Hindi,Malayali",1,
                                                  ifelse(india.2$ethnicity == "Kannadiga,Malayali,Other",1,
                                                         ifelse(india.2$ethnicity == "Malayali",1,
                                                                ifelse(india.2$ethnicity == "Malayali,Tamil",1,0))))))


india.2$ethnicitymarathi <- ifelse(india.2$ethnicity == "Gujarati,Hindi,Marathi",1,
                                   ifelse(india.2$ethnicity == " Hindi,Marathi",1,
                                          ifelse(india.2$ethnicity == "Hindi,Marathi,Kannadiga",1,
                                                 ifelse(india.2$ethnicity == "Marathi",1,0))))


india.2$ethnicityother <- ifelse(india.2$ethnicity == "Hindi,Kashmiri,Konkani",1,
                                 ifelse(india.2$ethnicity == "Hindi,Konkani,Kannadiga",1,
                                        ifelse(india.2$ethnicity == "Hindi,Other",1,
                                               ifelse(india.2$ethnicity == "Hindi,Telugu,Other",1,
                                                      ifelse(india.2$ethnicity == "Kannadiga,Malayali,Other",1,
                                                             ifelse(india.2$ethnicity == "Other",1,
                                                                    ifelse(india.2$ethnicity == "Tulu",1,0)))))))


india.2$ethnicitypunjabi <- ifelse(india.2$ethnicity == "Bengali,Hindi,Punjabi",1,
                                   ifelse(india.2$ethnicity == "Gujarati,Hindi,Punjabi",1,
                                          ifelse(india.2$ethnicity == "Hindi,Kashmiri,Punjabi",1,
                                                 ifelse(india.2$ethnicity == "Hindi,Punjabi",1,
                                                        ifelse(india.2$ethnicity == "Hindi,Punjabi,Tamil",1,
                                                               ifelse(india.2$ethnicity == "Hindi,Punjabi,Telugu",1,
                                                                      ifelse(india.2$ethnicity == "Punjabi",1,0)))))))



india.2$ethnicitytamil <- ifelse(india.2$ethnicity == "Bengali,Hindi,Tamil",1,
                                 ifelse(india.2$ethnicity == "Gujarati,Hindi,Tamil",1,
                                        ifelse(india.2$ethnicity == "Gujarati,Hindi,Tamil,Telugu",1,
                                               ifelse(india.2$ethnicity == "Hindi,Punjabi,Tamil",1,
                                                      ifelse(india.2$ethnicity == "Hindi,Tamil",1,
                                                             ifelse(india.2$ethnicity == "Hindi,Tamil,Telugu",1,
                                                                    ifelse(india.2$ethnicity == "Malayali,Tamil",1,
                                                                           ifelse(india.2$ethnicity == "Tamil",1,
                                                                                  ifelse(india.2$ethnicity == "Tamil,Telugu",1,0)))))))))



india.2$ethnicitytelugu <- ifelse(india.2$ethnicity == "Gujarati,Hindi,Tamil,Telugu",1,
                                  ifelse(india.2$ethnicity == "Gujarati,Hindi,Telugu",1,
                                         ifelse(india.2$ethnicity == "Hindi,Punjabi,Telugu",1,
                                                ifelse(india.2$ethnicity == "Hindi,Tamil,Telugu",1,
                                                       ifelse(india.2$ethnicity == "Hindi,Telugu",1,
                                                              ifelse(india.2$ethnicity == "Hindi,Telugu,Other",1,
                                                                     ifelse(india.2$ethnicity == "Tamil,Telugu",1,
                                                                            ifelse(india.2$ethnicity == "Telugu",1,0))))))))












summary(mod.contributepk.india.2.hetethnicity <- lm(contributePK ~ female_treat*ethnicityassamese + female_treat*ethnicitybengali
                                                    + female_treat*ethnicitygujarati + female_treat*ethnicitytelugu
                                                    + female_treat*ethnicitykashmiri + female_treat*ethnicitymalayali
                                                    + female_treat*ethnicitypunjabi  + female_treat*ethnicitytamil + female_treat*ethnicitykannadiga
                                                    + female_treat*ethnicityother, data=india.2 ))
summary(mod.contributemoney.india.2.hetethnicity <- lm(contributemoney ~ female_treat*ethnicityassamese + female_treat*ethnicitybengali
                                                       + female_treat*ethnicitygujarati + female_treat*ethnicitytelugu
                                                       + female_treat*ethnicitykashmiri  + female_treat*ethnicitymalayali
                                                       + female_treat*ethnicitypunjabi  + female_treat*ethnicitytamil + female_treat*ethnicitykannadiga
                                                       + female_treat*ethnicityother, data=india.2 ))



summary(mod.sad.india.2.hetethnicity <- lm(sad~ female_treat*ethnicityassamese + female_treat*ethnicitybengali
                                           + female_treat*ethnicitygujarati + female_treat*ethnicitytelugu
                                           + female_treat*ethnicitykashmiri  + female_treat*ethnicitymalayali
                                           + female_treat*ethnicitypunjabi  + female_treat*ethnicitytamil + female_treat*ethnicitykannadiga
                                           + female_treat*ethnicityother, data=india.2 ))
summary(mod.angry.india.2.hetethnicity <- lm(angry~ female_treat*ethnicityassamese + female_treat*ethnicitybengali
                                             + female_treat*ethnicitygujarati + female_treat*ethnicitytelugu
                                             + female_treat*ethnicitykashmiri  + female_treat*ethnicitymalayali
                                             + female_treat*ethnicitypunjabi  + female_treat*ethnicitytamil + female_treat*ethnicitykannadiga
                                             + female_treat*ethnicityother, data=india.2 ))
summary(mod.mistake.india.2.hetethnicity <- lm(mistake_tosend~ female_treat*ethnicityassamese + female_treat*ethnicitybengali
                                               + female_treat*ethnicitygujarati + female_treat*ethnicitytelugu
                                               + female_treat*ethnicitykashmiri  + female_treat*ethnicitymalayali
                                               + female_treat*ethnicitypunjabi  + female_treat*ethnicitytamil + female_treat*ethnicitykannadiga
                                               + female_treat*ethnicityother, data=india.2 ))



summary(mod.sexism.india.2.hetethnicity <- lm(moreoverallsexism~ female_treat*ethnicityassamese + female_treat*ethnicitybengali
                                              + female_treat*ethnicitygujarati + female_treat*ethnicitytelugu
                                              + female_treat*ethnicitykashmiri  + female_treat*ethnicitymalayali
                                              + female_treat*ethnicitypunjabi  + female_treat*ethnicitytamil + female_treat*ethnicitykannadiga
                                              + female_treat*ethnicityother, data=india.2 ))



stargazer(mod.contributepk.india.2.hetethnicity,mod.contributemoney.india.2.hetethnicity,
          mod.sad.india.2.hetethnicity,mod.angry.india.2.hetethnicity,mod.mistake.india.2.hetethnicity,mod.sexism.india.2.hetethnicity, digits=2)

















##South Africa 2 ## 

#########By Respondent Gender#######
south.africa.2$womanrespondent <- ifelse(south.africa.2$gender=="Woman",1,0)

summary(mod.contributepk.south.africa.2.hetwomen <- lm(contributePK ~ female_treat*womanrespondent, data=south.africa.2 ))
summary(mod.contributemoney.south.africa.2.hetwomen  <- lm(contributemoney ~ female_treat*womanrespondent, data=south.africa.2 ))

summary(mod.angry.south.africa.2.hetwomen <- lm(angry ~ female_treat*womanrespondent, data=south.africa.2 ))
summary(mod.sad.south.africa.2.hetwomen <- lm(sad ~ female_treat*womanrespondent*womanrespondent, data=south.africa.2 ))
summary(mod.mistake.south.africa.2.hetwomen <- lm(mistake_tosend ~ female_treat*womanrespondent, data=south.africa.2 ))

summary(mod.sexism.south.africa.2.hetwomen  <- lm(moreoverallsexism ~ female_treat*womanrespondent, data=south.africa.2 ))


stargazer(mod.contributepk.south.africa.2.hetwomen,mod.contributemoney.south.africa.2.hetwomen,
          mod.angry.south.africa.2.hetwomen,mod.sad.south.africa.2.hetwomen,mod.mistake.south.africa.2.hetwomen,mod.sexism.south.africa.2.hetwomen , digits=2)



#####By Sexism#####
summary(mod.contributepk.south.africa.2.hethostsex <- lm(contributePK ~ female_treat*moreoverallsexism, data=south.africa.2 ))
summary(mod.contributemoney.south.africa.2.hethostsex <- lm(contributemoney ~ female_treat*moreoverallsexism, data=south.africa.2 ))

summary(mod.angry.south.africa.2.hethostsex <- lm(angry ~ female_treat*moreoverallsexism, data=south.africa.2 ))
summary(mod.sad.south.africa.2.hethostsex <- lm(sad ~ female_treat*moreoverallsexism, data=south.africa.2 ))
summary(mod.mistake.south.africa.2.hethostsex<- lm(mistake_tosend ~ female_treat*moreoverallsexism, data=south.africa.2 ))


stargazer(mod.contributepk.south.africa.2.hethostsex,mod.contributemoney.south.africa.2.hethostsex,
          mod.angry.south.africa.2.hethostsex,mod.sad.south.africa.2.hethostsex,mod.mistake.south.africa.2.hethostsex,digits=2)





##By Age##
summary(mod.contributepk.south.africa.2.hetage <- lm(contributePK ~ female_treat*age, data=south.africa.2 ))
summary(mod.contributemoney.south.africa.2.hetage <- lm(contributemoney ~ female_treat*age, data=south.africa.2 ))


summary(mod.angry.south.africa.2.hetage <- lm(angry ~ female_treat*age, data=south.africa.2 ))
summary(mod.sad.south.africa.2.hetage <- lm(sad ~ female_treat*age, data=south.africa.2 ))
summary(mod.mistake.south.africa.2.hetage <- lm(mistake_tosend ~ female_treat*age, data=south.africa.2 ))


summary(mod.sexism.south.africa.2.hetage <- lm(moreoverallsexism~ female_treat*age, data=south.africa.2 ))


stargazer(mod.contributepk.south.africa.2.hetage,mod.contributemoney.south.africa.2.hetage,
          mod.angry.south.africa.2.hetage,mod.sad.south.africa.2.hetage,mod.mistake.south.africa.2.hetage,mod.sexism.south.africa.2.hetage, digits=2)




####By Party###
summary(mod.contributepk.south.africa.2.hetparty <- lm(contributePK ~ female_treat*as.numeric(partywarmth_1) +  female_treat*as.numeric(partywarmth_2) +  female_treat*as.numeric(partywarmth_3), data=south.africa.2 ))
summary(mod.contributemoney.south.africa.2.hetparty <- lm(contributemoney ~ female_treat*as.numeric(partywarmth_1)+  female_treat*as.numeric(partywarmth_2) +  female_treat*as.numeric(partywarmth_3), data=south.africa.2 ))

summary(mod.angry.south.africa.2.hetparty <- lm(angry ~ female_treat*as.numeric(partywarmth_1) +  female_treat*as.numeric(partywarmth_2) +  female_treat*as.numeric(partywarmth_3), data=south.africa.2 ))
summary(mod.sad.south.africa.2.hetparty <- lm(sad ~ female_treat*as.numeric(partywarmth_1) +  female_treat*as.numeric(partywarmth_2) +  female_treat*as.numeric(partywarmth_3), data=south.africa.2 ))
summary(mod.mistake.south.africa.2.hetparty <- lm(mistake_tosend ~ female_treat*as.numeric(partywarmth_1) +  female_treat*as.numeric(partywarmth_2) +  female_treat*as.numeric(partywarmth_3), data=south.africa.2 ))

summary(mod.sexism.south.africa.2.hetparty <- lm(moreoverallsexism~ female_treat*as.numeric(partywarmth_1)+  female_treat*as.numeric(partywarmth_2) +  female_treat*as.numeric(partywarmth_3), data=south.africa.2 ))


stargazer(mod.contributepk.south.africa.2.hetparty,mod.contributemoney.south.africa.2.hetparty,
          mod.angry.south.africa.2.hetparty,mod.sad.south.africa.2.hetparty,mod.mistake.south.africa.2.hetparty,mod.sexism.south.africa.2.hetparty, digits=2)




###By PK Knowledge###
summary(mod.contributepk.south.africa.2.hetpkknow <- lm(contributePK ~ female_treat*pknowledge, data=south.africa.2 ))
summary(mod.contributemoney.south.africa.2.hetpkknow <- lm(contributemoney ~ female_treat*pknowledge, data=south.africa.2 ))

summary(mod.angry.south.africa.2.hetpkknow <- lm(angry ~ female_treat*pknowledge, data=south.africa.2 ))
summary(mod.sad.south.africa.2.hetpkknow <- lm(sad ~ female_treat*pknowledge, data=south.africa.2 ))
summary(mod.mistake.south.africa.2.hetpkknow <- lm(mistake_tosend ~ female_treat*pknowledge, data=south.africa.2 ))


summary(mod.sexism.south.africa.2.hetpkknow <- lm(moreoverallsexism~ female_treat*pknowledge, data=south.africa.2 ))


stargazer(mod.contributepk.south.africa.2.hetpkknow,mod.contributemoney.south.africa.2.hetpkknow,
          mod.angry.south.africa.2.hetpkknow,mod.sad.south.africa.2.hetpkknow,mod.mistake.south.africa.2.hetpkknow,mod.sexism.south.africa.2.hetpkknow, digits=2)







###By PK Knowledge Choice###
summary(mod.contributepk.south.africa.2.hetsc <- lm(contributePK ~ female_treat*as.factor(securitycouncil), data=south.africa.2 ))
summary(mod.contributemoney.south.africa.2.hetsc<- lm(contributemoney ~ female_treat*as.factor(securitycouncil), data=south.africa.2 ))

summary(mod.angry.south.africa.2.hetsc <- lm(angry ~ female_treat*as.factor(securitycouncil), data=south.africa.2 ))
summary(mod.sad.south.africa.2.hetsc <- lm(sad ~ female_treat*as.factor(securitycouncil), data=south.africa.2 ))
summary(mod.mistake.south.africa.2.hetsc <- lm(mistake_tosend ~ female_treat*as.factor(securitycouncil), data=south.africa.2 ))


summary(mod.sexism.south.africa.2.hetsc <- lm(moreoverallsexism~ female_treat*as.factor(securitycouncil), data=south.africa.2 ))

stargazer(mod.contributepk.south.africa.2.hetsc,mod.contributemoney.south.africa.2.hetsc,
          mod.angry.south.africa.2.hetsc,mod.sad.south.africa.2.hetsc,mod.mistake.south.africa.2.hetsc,mod.sexism.south.africa.2.hetsc, digits=2)




###By Urban Rural###
summary(mod.contributepk.south.africa.2.heturban <- lm(contributePK ~ female_treat*as.factor(ruralurban), data=south.africa.2 ))
summary(mod.contributemoney.south.africa.2.heturban <- lm(contributemoney ~ female_treat*as.factor(ruralurban), data=south.africa.2 ))


summary(mod.angry.south.africa.2.heturban <- lm(angry ~ female_treat*as.factor(ruralurban), data=south.africa.2 ))
summary(mod.sad.south.africa.2.heturban <- lm(sad ~ female_treat*as.factor(ruralurban), data=south.africa.2 ))
summary(mod.mistake.south.africa.2.heturban <- lm(mistake_tosend ~ female_treat*as.factor(ruralurban), data=south.africa.2 ))

summary(mod.sexism.south.africa.2.heturban <- lm(moreoverallsexism~ female_treat*as.factor(ruralurban), data=south.africa.2 ))


stargazer(mod.contributepk.south.africa.2.heturban,mod.contributemoney.south.africa.2.heturban,
          mod.angry.south.africa.2.heturban,mod.sad.south.africa.2.heturban,mod.mistake.south.africa.2.heturban,mod.sexism.south.africa.2.heturban, digits=2)







##By religion
summary(mod.contributepk.south.africa.2.hetreligion <- lm(contributePK ~ female_treat*as.factor(religion), data=south.africa.2 ))
summary(mod.contributemoney.south.africa.2.hetreligion <- lm(contributemoney ~ female_treat*as.factor(religion), data=south.africa.2 ))

summary(mod.angry.south.africa.2.hetreligion <- lm(angry ~ female_treat*as.factor(religion), data=south.africa.2 ))
summary(mod.sad.south.africa.2.hetreligion <- lm(sad ~ female_treat*as.factor(religion), data=south.africa.2 ))
summary(mod.mistake.south.africa.2.hetreligion <- lm(mistake_tosend ~ female_treat*as.factor(religion), data=south.africa.2 ))


summary(mod.sexism.south.africa.2.hetreligion <- lm(moreoverallsexism~ female_treat*as.factor(religion), data=south.africa.2 ))

stargazer(mod.contributepk.south.africa.2.hetreligion,mod.contributemoney.south.africa.2.hetreligion,
          mod.angry.south.africa.2.hetreligion,mod.sad.south.africa.2.hetreligion,mod.mistake.south.africa.2.hetreligion,mod.sexism.south.africa.2.hetreligion, digits=2)





#By Mother tongue#



###Code individual languages##
table(south.africa.2$language)
south.africa.2$firstlanguage_Afrikaans <- ifelse(south.africa.2$language == "Afrikaans",1,
                                                 ifelse(south.africa.2$language == "Afrikaans,English",1,
                                                        ifelse(south.africa.2$language == "Afrikaans,English,Other",1,
                                                               ifelse(south.africa.2$language == "Afrikaans,English,Tswana",1,
                                                                      ifelse(south.africa.2$language == "Afrikaans,English,Xhosa",1,
                                                                             ifelse(south.africa.2$language == "Afrikaans,English,Zulu",1,0))))))
summary(south.africa.2$firstlanguage_Afrikaans) #20

south.africa.2$firstlanguage_English <- ifelse(south.africa.2$language == "Afrikaans,English", 1,
                                               ifelse(south.africa.2$language == "Afrikaans,English,Other", 1,
                                                      ifelse(south.africa.2$language == "Afrikaans,English,Tswana", 1,
                                                             ifelse(south.africa.2$language == "Afrikaans,English,Xhosa", 1,
                                                                    ifelse(south.africa.2$language == "Afrikaans,English,Zulu", 1,
                                                                           ifelse(south.africa.2$language == "English", 1,
                                                                                  ifelse(south.africa.2$language == "English,Ndebele", 1,
                                                                                         ifelse(south.africa.2$language == "English,Ndebele,Pedi", 1,
                                                                                                ifelse(south.africa.2$language == "English,Other", 1,
                                                                                                       ifelse(south.africa.2$language == "English,Pedi", 1,
                                                                                                              ifelse(south.africa.2$language == "English,Pedi,Sotho ", 1,
                                                                                                                     ifelse(south.africa.2$language == "English,Pedi,Tswana", 1,
                                                                                                                            ifelse(south.africa.2$language == "English,Sotho", 1,
                                                                                                                                   ifelse(south.africa.2$language == "English,Sotho,Tswana", 1,
                                                                                                                                          ifelse(south.africa.2$language == "English,Sotho,Zulu", 1,
                                                                                                                                                 ifelse(south.africa.2$language == "English,Swati", 1,
                                                                                                                                                        ifelse(south.africa.2$language == "English,Swati,Xhosa", 1,
                                                                                                                                                               ifelse(south.africa.2$language == "English,Tsonga", 1,
                                                                                                                                                                      ifelse(south.africa.2$language == "English,Tswana", 1,
                                                                                                                                                                             ifelse(south.africa.2$language == "English,Venda", 1,
                                                                                                                                                                                    ifelse(south.africa.2$language == "English,Xhosa", 1,
                                                                                                                                                                                           ifelse(south.africa.2$language == "English,Xhosa,Zulu", 1,
                                                                                                                                                                                                  ifelse(south.africa.2$language == "English,Zulu", 1,0)))))))))))))))))))))))

summary(south.africa.2$firstlanguage_English) #42

south.africa.2$firstlanguage_Pedi<- ifelse(south.africa.2$language == "English,Ndebele,Pedi",1,
                                           ifelse(south.africa.2$language == "English,Pedi",1,
                                                  ifelse(south.africa.2$language == "English,Pedi,Sotho",1,
                                                         ifelse(south.africa.2$language == "English,Pedi,Tswana",1,
                                                                ifelse(south.africa.2$language == "Pedi",1,
                                                                       ifelse(south.africa.2$language == "Pedi,Other",1,
                                                                              ifelse(south.africa.2$language == "Pedi,Zulu",1,0)))))))


summary(south.africa.2$firstlanguage_Pedi) #6% (9% national)

south.africa.2$firstlanguage_Tswana <- ifelse(south.africa.2$language == "Afrikaans,English,Tswana", 1,
                                              ifelse(south.africa.2$language == "English,Pedi,Tswana", 1,
                                                     ifelse(south.africa.2$language == "English,Sotho,Tswana", 1,
                                                            ifelse(south.africa.2$language == "English,Tswana", 1,
                                                                   ifelse(south.africa.2$language == "Swati,Tsonga,Tswana", 1,
                                                                          ifelse(south.africa.2$language == "Swati,Tswana", 1,
                                                                                 ifelse(south.africa.2$language == "Tswana", 1,
                                                                                        ifelse(south.africa.2$language == "Tswana,Zulu", 1,0))))))))
summary(south.africa.2$firstlanguage_Tswana) #6.6% (8% national)

south.africa.2$firstlanguage_Xhosa<- ifelse(south.africa.2$language == "Afrikaans,English,Xhosa", 1,
                                            ifelse(south.africa.2$language == "English,Swati,Xhosa", 1,
                                                   ifelse(south.africa.2$language == "English,Xhosa", 1,
                                                          ifelse(south.africa.2$language == "English,Xhosa,Zulu", 1,
                                                                 ifelse(south.africa.2$language == "Sotho,Xhosa ", 1,
                                                                        ifelse(south.africa.2$language == "Xhosa", 1,
                                                                               ifelse(south.africa.2$language == "Xhosa,Zulu", 1,0)))))))

summary(south.africa.2$firstlanguage_Xhosa) #8% (16% national)

south.africa.2$firstlanguage_Zulu<- ifelse(south.africa.2$language == "Afrikaans,English,Zulu", 1,
                                           ifelse(south.africa.2$language == "English,Sotho,Zulu", 1,
                                                  ifelse(south.africa.2$language == "English,Xhosa,Zulu", 1,
                                                         ifelse(south.africa.2$language == "English,Zulu", 1,
                                                                ifelse(south.africa.2$language == "Ndebele,Zulu", 1,
                                                                       ifelse(south.africa.2$language == "Pedi,Zulu", 1,
                                                                              ifelse(south.africa.2$language == "Sotho,Zulu", 1,
                                                                                     ifelse(south.africa.2$language == "Swati,Zulu", 1,
                                                                                            ifelse(south.africa.2$language == "Tsonga,Zulu", 1,
                                                                                                   ifelse(south.africa.2$language == "Tswana,Zulu", 1,
                                                                                                          ifelse(south.africa.2$language == "Xhosa,Zulu", 1,
                                                                                                                 ifelse(south.africa.2$language == "Zulu", 1,0))))))))))))

summary(south.africa.2$firstlanguage_Zulu) #15 (22.7% national)

south.africa.2$firstlanguage_Sotho<- ifelse(south.africa.2$language == "English,Pedi,Sotho", 1,
                                            ifelse(south.africa.2$language == "English,Sotho", 1,
                                                   ifelse(south.africa.2$language == "English,Sotho,Tswana", 1,
                                                          ifelse(south.africa.2$language == "English,Sotho,Zulu", 1,
                                                                 ifelse(south.africa.2$language == "Sotho", 1,
                                                                        ifelse(south.africa.2$language == "Sotho,Xhosa", 1,
                                                                               ifelse(south.africa.2$language == "Sotho,Zulu", 1,0)))))))
summary(south.africa.2$firstlanguage_Sotho) #6% (8% nationally)

south.africa.2$firstlanguage_Swati<- ifelse(south.africa.2$language == "English,Swati", 1,
                                            ifelse(south.africa.2$language == "English,Swati,Xhosa", 1,
                                                   ifelse(south.africa.2$language == "Swati", 1,
                                                          ifelse(south.africa.2$language == "Swati,Tsonga,Tswana", 1,
                                                                 ifelse(south.africa.2$language == "Swati,Tswana", 1,
                                                                        ifelse(south.africa.2$language == "Swati,Zulu", 1,0))))))
summary(south.africa.2$firstlanguage_Swati) #2% (2.5% nationally)

south.africa.2$firstlanguage_Venda<- ifelse(south.africa.2$language == "English,Venda", 1,
                                            ifelse(south.africa.2$language == "Venda", 1,0))
summary(south.africa.2$firstlanguage_Venda) #2.2% (2.4% national)

south.africa.2$firstlanguage_Tsonga<- ifelse(south.africa.2$language == "English,Tsonga", 1,
                                             ifelse(south.africa.2$language == "Swati,Tsonga,Tswana", 1,
                                                    ifelse(south.africa.2$language == "Tsonga", 1,
                                                           ifelse(south.africa.2$language == "Tsonga,Zulu", 1,0))))
summary(south.africa.2$firstlanguage_Tsonga) #2.7% (4.5% national)

south.africa.2$firstlanguage_Ndebele<- ifelse(south.africa.2$language == "English,Ndebele", 1,
                                              ifelse(south.africa.2$language == "English,Ndebele,Pedi", 1,
                                                     ifelse(south.africa.2$language == "Ndebele", 1,
                                                            ifelse(south.africa.2$language == "Ndebele,Zulu", 1,0))))
summary(south.africa.2$firstlanguage_Ndebele) #2 (national 2%)

south.africa.2$firstlanguage_Other<- ifelse(south.africa.2$language == "Afrikaans,English,Other", 1,
                                            ifelse(south.africa.2$language == "English,Other", 1,
                                                   ifelse(south.africa.2$language == "Pedi,Other", 1,
                                                          ifelse(south.africa.2$language == "Other", 1,0))))
summary(south.africa.2$firstlanguage_Other) #2.2%

south.africa.2$firstlanguage_Africanlanguage <- ifelse(south.africa.2$firstlanguage_Ndebele == 1,1,
                                                       ifelse(south.africa.2$firstlanguage_Xhosa == 1,1,
                                                              ifelse(south.africa.2$firstlanguage_Zulu == 1,1,
                                                                     ifelse(south.africa.2$firstlanguage_Swati == 1,1,
                                                                            ifelse(south.africa.2$firstlanguage_Tsonga == 1,1,
                                                                                   ifelse(south.africa.2$firstlanguage_Sotho == 1,1,
                                                                                          ifelse(south.africa.2$firstlanguage_Tswana == 1,1,
                                                                                                 ifelse(south.africa.2$firstlanguage_Venda == 1,1,
                                                                                                        ifelse(south.africa.2$firstlanguage_Pedi == 1,1,0)))))))))

summary(south.africa.2$firstlanguage_Africanlanguage) #49% -lower than I'd expect. 

south.africa.2$firstlanguage_AfrikaansorEnglishonly <- ifelse(south.africa.2$language == "Afrikaans",1,
                                                              ifelse(south.africa.2$language == "Afrikaans,English",1,
                                                                     ifelse(south.africa.2$language == "English",1,0)))
summary(south.africa.2$firstlanguage_AfrikaansorEnglishonly) 



#African Language Dichot
summary(mod.contributepk.south.africa.2.hetafricanlanguage <- lm(contributePK ~ female_treat*firstlanguage_Africanlanguage, data=south.africa.2 ))
summary(mod.contributemoney.south.africa.2.hetafricanlanguage <- lm(contributemoney ~ female_treat*firstlanguage_Africanlanguage, data=south.africa.2 ))

summary(mod.sad.south.africa.2.hetafricanlanguage <- lm(sad~ female_treat*firstlanguage_Africanlanguage, data=south.africa.2 ))
summary(mod.angry.south.africa.2.hetafricanlanguage <- lm(angry ~ female_treat*firstlanguage_Africanlanguage, data=south.africa.2 ))
summary(mod.mistake.south.africa.2.hetafricanlanguage <- lm(mistake_tosend ~ female_treat*firstlanguage_Africanlanguage, data=south.africa.2 ))


summary(mod.sexism.south.africa.2.hetafricanlanguage <- lm(moreoverallsexism~ female_treat*firstlanguage_Africanlanguage, data=south.africa.2 ))



stargazer(mod.contributepk.south.africa.2.hetafricanlanguage,mod.contributemoney.south.africa.2.hetafricanlanguage,
          mod.sad.south.africa.2.hetafricanlanguage,mod.angry.south.africa.2.hetafricanlanguage,mod.mistake.south.africa.2.hetafricanlanguage,mod.sexism.south.africa.2.hetafricanlanguage, digits=2)







#All Languages 
summary(mod.contributepk.south.africa.2.hetalllanguage <- lm(contributePK ~ female_treat*firstlanguage_Afrikaans + female_treat*firstlanguage_AfrikaansorEnglishonly
                                                             + female_treat*firstlanguage_Ndebele  + female_treat*firstlanguage_Other  + female_treat*firstlanguage_Pedi 
                                                             + female_treat*firstlanguage_Sotho  + female_treat*firstlanguage_Swati +  + female_treat*firstlanguage_Tsonga
                                                             + female_treat*firstlanguage_Tswana  + female_treat*firstlanguage_Venda  + female_treat*firstlanguage_Xhosa 
                                                             + female_treat*firstlanguage_Zulu, data=south.africa.2 ))
summary(mod.contributemoney.south.africa.2.hetalllanguage <- lm(contributemoney ~female_treat*firstlanguage_Afrikaans + female_treat*firstlanguage_AfrikaansorEnglishonly
                                                                + female_treat*firstlanguage_Ndebele  + female_treat*firstlanguage_Other  + female_treat*firstlanguage_Pedi 
                                                                + female_treat*firstlanguage_Sotho  + female_treat*firstlanguage_Swati +  + female_treat*firstlanguage_Tsonga
                                                                + female_treat*firstlanguage_Tswana  + female_treat*firstlanguage_Venda  + female_treat*firstlanguage_Xhosa 
                                                                + female_treat*firstlanguage_Zulu, data=south.africa.2 ))


summary(mod.sad.south.africa.2.hetalllanguage <- lm(sad~ female_treat*firstlanguage_Afrikaans + female_treat*firstlanguage_AfrikaansorEnglishonly
                                                    + female_treat*firstlanguage_Ndebele  + female_treat*firstlanguage_Other  + female_treat*firstlanguage_Pedi 
                                                    + female_treat*firstlanguage_Sotho  + female_treat*firstlanguage_Swati +  + female_treat*firstlanguage_Tsonga
                                                    + female_treat*firstlanguage_Tswana  + female_treat*firstlanguage_Venda  + female_treat*firstlanguage_Xhosa 
                                                    + female_treat*firstlanguage_Zulu, data=south.africa.2 ))
summary(mod.angry.south.africa.2.hetalllanguage <- lm(angry ~ female_treat*firstlanguage_Afrikaans + female_treat*firstlanguage_AfrikaansorEnglishonly
                                                      + female_treat*firstlanguage_Ndebele  + female_treat*firstlanguage_Other  + female_treat*firstlanguage_Pedi 
                                                      + female_treat*firstlanguage_Sotho  + female_treat*firstlanguage_Swati +  + female_treat*firstlanguage_Tsonga
                                                      + female_treat*firstlanguage_Tswana  + female_treat*firstlanguage_Venda  + female_treat*firstlanguage_Xhosa 
                                                      + female_treat*firstlanguage_Zulu, data=south.africa.2 ))
summary(mod.mistake.south.africa.2.hetalllanguage <- lm(mistake_tosend ~ female_treat*firstlanguage_Afrikaans + female_treat*firstlanguage_AfrikaansorEnglishonly
                                                        + female_treat*firstlanguage_Ndebele  + female_treat*firstlanguage_Other  + female_treat*firstlanguage_Pedi 
                                                        + female_treat*firstlanguage_Sotho  + female_treat*firstlanguage_Swati +  + female_treat*firstlanguage_Tsonga
                                                        + female_treat*firstlanguage_Tswana  + female_treat*firstlanguage_Venda  + female_treat*firstlanguage_Xhosa 
                                                        + female_treat*firstlanguage_Zulu, data=south.africa.2 ))


summary(mod.sexism.south.africa.2.hetalllanguage <- lm(moreoverallsexism~ female_treat*firstlanguage_Afrikaans + female_treat*firstlanguage_AfrikaansorEnglishonly
                                                       + female_treat*firstlanguage_Ndebele  + female_treat*firstlanguage_Other  + female_treat*firstlanguage_Pedi 
                                                       + female_treat*firstlanguage_Sotho  + female_treat*firstlanguage_Swati +  + female_treat*firstlanguage_Tsonga
                                                       + female_treat*firstlanguage_Tswana  + female_treat*firstlanguage_Venda  + female_treat*firstlanguage_Xhosa 
                                                       + female_treat*firstlanguage_Zulu, data=south.africa.2 ))



stargazer(mod.contributepk.south.africa.2.hetalllanguage,mod.contributemoney.south.africa.2.hetalllanguage,
          mod.sad.south.africa.2.hetalllanguage,mod.angry.south.africa.2.hetalllanguage,mod.mistake.south.africa.2.hetalllanguage, mod.sexism.south.africa.2.hetalllanguage,digits=2)









################################################################################################################################



##########With Demographic/Individual Controls########

#India 1##
table(india.1$religion)
india.1$Hindu <- ifelse(india.1$religion == "Hinduism",1,0)

table(india.1$securitycouncil)
india.1$securitycouncilcorrect <- ifelse(india.1$securitycouncil == "Germany",1,0)
summary(india.1$securitycouncilcorrect)


summary(mod.controls.contributepk.india1 <- lm(contributePK ~ female_treat + womanrespondent + pknowledge + securitycouncilcorrect  + as.numeric(partywarmth_1) + as.numeric(partywarmth_2) 
                                               + Hindu  + age + as.factor(ruralurban)  + as.factor(state) 
                                               + ethnicityassamese + ethnicitybengali + ethnicitygujarati + ethnicitykannadiga + 
                                                 ethnicitykashmiri + ethnicitykonkani  + ethnicitymalayali + ethnicitymarathi + ethnicityother
                                               + ethnicitypunjabi + ethnicitytamil + ethnicitytelugu, data=  india.1))
summary(mod.controls.contributemondy.india1 <- lm(contributemoney ~ female_treat + womanrespondent + pknowledge + securitycouncilcorrect  + as.numeric(partywarmth_1) + as.numeric(partywarmth_2) 
                                                  + Hindu  + age + as.factor(ruralurban)  + as.factor(state) 
                                                  + ethnicityassamese + ethnicitybengali + ethnicitygujarati + ethnicitykannadiga + 
                                                    ethnicitykashmiri + ethnicitykonkani  + ethnicitymalayali + ethnicitymarathi + ethnicityother
                                                  + ethnicitypunjabi + ethnicitytamil + ethnicitytelugu, data=  india.1))

summary(mod.controls.sexism.india1 <- lm(moreoverallsexism~female_treat + womanrespondent + pknowledge + securitycouncilcorrect  + as.numeric(partywarmth_1) + as.numeric(partywarmth_2) 
                                         + Hindu  + age + as.factor(ruralurban)  + as.factor(state) 
                                         + ethnicityassamese + ethnicitybengali + ethnicitygujarati + ethnicitykannadiga + 
                                           ethnicitykashmiri + ethnicitykonkani  + ethnicitymalayali + ethnicitymarathi + ethnicityother
                                         + ethnicitypunjabi + ethnicitytamil + ethnicitytelugu, data=  india.1))


stargazer(mod.controls.contributepk.india1, mod.controls.contributemondy.india1,mod.controls.sexism.india1, digits=2)







#South Africa 1##

table(south.africa.1$securitycouncil)
south.africa.1$securitycouncilcorrect <- ifelse(south.africa.1$securitycouncil == "Germany",1,0)
summary(south.africa.1$securitycouncilcorrect)


summary(mod.controls.contributepksouth.africa.1 <- lm(contributePK ~ female_treat + womanrespondent + pknowledge + securitycouncilcorrect 
                                                      + as.numeric(partywarmth_1) + as.numeric(partywarmth_2) + as.numeric(partywarmth_3) 
                                                      + Christian  + age + as.factor(ruralurban)  + as.factor(state) + firstlanguage_Afrikaans + 
                                                        + firstlanguage_Ndebele  + firstlanguage_Other  + firstlanguage_Pedi 
                                                      + firstlanguage_Sotho  + firstlanguage_Swati +  + firstlanguage_Tsonga
                                                      + firstlanguage_Tswana  + firstlanguage_Venda  + firstlanguage_Xhosa 
                                                      + firstlanguage_Zulu, data=  south.africa.1))

summary(mod.controls.contributemondysouth.africa.1 <- lm(contributemoney ~ female_treat + womanrespondent + pknowledge + securitycouncilcorrect 
                                                         + as.numeric(partywarmth_1) + as.numeric(partywarmth_2) + as.numeric(partywarmth_3) 
                                                         + Christian  + age + as.factor(ruralurban)  + as.factor(state) + firstlanguage_Afrikaans + 
                                                           + firstlanguage_Ndebele  + firstlanguage_Other  + firstlanguage_Pedi 
                                                         + firstlanguage_Sotho  + firstlanguage_Swati +  + firstlanguage_Tsonga
                                                         + firstlanguage_Tswana  + firstlanguage_Venda  + firstlanguage_Xhosa 
                                                         + firstlanguage_Zulu, data=  south.africa.1))

summary(mod.controls.sexism.africa.1 <- lm(moreoverallsexism~female_treat + womanrespondent + pknowledge + securitycouncilcorrect 
                                           + as.numeric(partywarmth_1) + as.numeric(partywarmth_2) + as.numeric(partywarmth_3) 
                                           + Christian  + age + as.factor(ruralurban)  + as.factor(state) + firstlanguage_Afrikaans + 
                                             + firstlanguage_Ndebele  + firstlanguage_Other  + firstlanguage_Pedi 
                                           + firstlanguage_Sotho  + firstlanguage_Swati +  + firstlanguage_Tsonga
                                           + firstlanguage_Tswana  + firstlanguage_Venda  + firstlanguage_Xhosa 
                                           + firstlanguage_Zulu, data=  south.africa.1))


stargazer(mod.controls.contributepksouth.africa.1, mod.controls.contributemondysouth.africa.1,
          mod.controls.sexism.africa.1, digits=2)





#India 2##
table(india.2$religion)
india.2$Hindu <- ifelse(india.2$religion == "Hinduism",1,0)

table(india.2$securitycouncil)
india.2$securitycouncilcorrect <- ifelse(india.2$securitycouncil == "Germany",1,0)
summary(india.2$securitycouncilcorrect)


summary(mod.controls.contributepk.india1 <- lm(contributePK ~ female_treat + womanrespondent + pknowledge + securitycouncilcorrect  + as.numeric(partywarmth_1) + as.numeric(partywarmth_2) 
                                               + Hindu  + age + as.factor(ruralurban)  + as.factor(state) 
                                               + ethnicityassamese + ethnicitybengali + ethnicitygujarati + ethnicitykannadiga + 
                                                 ethnicitykashmiri  + ethnicitymalayali + ethnicitymarathi + ethnicityother
                                               + ethnicitypunjabi + ethnicitytamil + ethnicitytelugu, data=  india.2))
summary(mod.controls.contributemondy.india1 <- lm(contributemoney ~ female_treat + womanrespondent + pknowledge + securitycouncilcorrect  + as.numeric(partywarmth_1) + as.numeric(partywarmth_2) 
                                                  + Hindu  + age + as.factor(ruralurban)  + as.factor(state) 
                                                  + ethnicityassamese + ethnicitybengali + ethnicitygujarati + ethnicitykannadiga + 
                                                    ethnicitykashmiri   + ethnicitymalayali + ethnicitymarathi + ethnicityother
                                                  + ethnicitypunjabi + ethnicitytamil + ethnicitytelugu, data=  india.2))


summary(mod.controls.sad.india1 <- lm(sad~female_treat + womanrespondent + pknowledge + securitycouncilcorrect  + as.numeric(partywarmth_1) + as.numeric(partywarmth_2) 
                                      + Hindu  + age + as.factor(ruralurban)  + as.factor(state) 
                                      + ethnicityassamese + ethnicitybengali + ethnicitygujarati + ethnicitykannadiga + 
                                        ethnicitykashmiri   + ethnicitymalayali + ethnicitymarathi + ethnicityother
                                      + ethnicitypunjabi + ethnicitytamil + ethnicitytelugu, data=  india.2))
summary(mod.controls.angry.india1 <- lm(angry~ female_treat + womanrespondent + pknowledge + securitycouncilcorrect  + as.numeric(partywarmth_1) + as.numeric(partywarmth_2) 
                                        + Hindu  + age + as.factor(ruralurban)  + as.factor(state) 
                                        + ethnicityassamese + ethnicitybengali + ethnicitygujarati + ethnicitykannadiga + 
                                          ethnicitykashmiri  + ethnicitymalayali + ethnicitymarathi + ethnicityother
                                        + ethnicitypunjabi + ethnicitytamil + ethnicitytelugu, data=  india.2))
summary(mod.controls.mistake.india1 <- lm(mistake_tosend ~ female_treat + womanrespondent + pknowledge + securitycouncilcorrect  + as.numeric(partywarmth_1) + as.numeric(partywarmth_2) 
                                          + Hindu  + age + as.factor(ruralurban)  + as.factor(state) 
                                          + ethnicityassamese + ethnicitybengali + ethnicitygujarati + ethnicitykannadiga + 
                                            ethnicitykashmiri   + ethnicitymalayali + ethnicitymarathi + ethnicityother
                                          + ethnicitypunjabi + ethnicitytamil + ethnicitytelugu, data=  india.2))



summary(mod.controls.sexism.india1 <- lm(moreoverallsexism~female_treat + womanrespondent + pknowledge + securitycouncilcorrect  + as.numeric(partywarmth_1) + as.numeric(partywarmth_2) 
                                         + Hindu  + age + as.factor(ruralurban)  + as.factor(state) 
                                         + ethnicityassamese + ethnicitybengali + ethnicitygujarati + ethnicitykannadiga + 
                                           ethnicitykashmiri   + ethnicitymalayali + ethnicitymarathi + ethnicityother
                                         + ethnicitypunjabi + ethnicitytamil + ethnicitytelugu, data=  india.2))


stargazer(mod.controls.contributepk.india1, mod.controls.contributemondy.india1,
          mod.controls.sad.india1,mod.controls.angry.india1,mod.controls.mistake.india1, 
          mod.controls.sexism.india1,digits=2)









#South Africa 1##

table(south.africa.2$securitycouncil)
south.africa.2$securitycouncilcorrect <- ifelse(south.africa.2$securitycouncil == "Germany",1,0)
summary(south.africa.2$securitycouncilcorrect)


summary(mod.controls.contributepk.south.africa.2 <- lm(contributePK ~ female_treat + womanrespondent + pknowledge + securitycouncilcorrect 
                                                       + as.numeric(partywarmth_1) + as.numeric(partywarmth_2) + as.numeric(partywarmth_3) 
                                                       + Christian  + age + as.factor(ruralurban)  + as.factor(state) + firstlanguage_Afrikaans + 
                                                         + firstlanguage_Ndebele  + firstlanguage_Other  + firstlanguage_Pedi 
                                                       + firstlanguage_Sotho  + firstlanguage_Swati +  + firstlanguage_Tsonga
                                                       + firstlanguage_Tswana  + firstlanguage_Venda  + firstlanguage_Xhosa 
                                                       + firstlanguage_Zulu, data=  south.africa.2))

summary(mod.controls.contributemondy.south.africa.2 <- lm(contributemoney ~ female_treat + womanrespondent + pknowledge + securitycouncilcorrect 
                                                          + as.numeric(partywarmth_1) + as.numeric(partywarmth_2) + as.numeric(partywarmth_3) 
                                                          + Christian  + age + as.factor(ruralurban)  + as.factor(state) + firstlanguage_Afrikaans + 
                                                            + firstlanguage_Ndebele  + firstlanguage_Other  + firstlanguage_Pedi 
                                                          + firstlanguage_Sotho  + firstlanguage_Swati +  + firstlanguage_Tsonga
                                                          + firstlanguage_Tswana  + firstlanguage_Venda  + firstlanguage_Xhosa 
                                                          + firstlanguage_Zulu, data=  south.africa.2))


summary(mod.controls.sad.south.africa.2 <- lm(sad~female_treat + womanrespondent + pknowledge + securitycouncilcorrect 
                                              + as.numeric(partywarmth_1) + as.numeric(partywarmth_2) + as.numeric(partywarmth_3) 
                                              + Christian  + age + as.factor(ruralurban)  + as.factor(state) + firstlanguage_Afrikaans + 
                                                + firstlanguage_Ndebele  + firstlanguage_Other  + firstlanguage_Pedi 
                                              + firstlanguage_Sotho  + firstlanguage_Swati +  + firstlanguage_Tsonga
                                              + firstlanguage_Tswana  + firstlanguage_Venda  + firstlanguage_Xhosa 
                                              + firstlanguage_Zulu, data=  south.africa.2))

summary(mod.controls.angry.africa.2 <- lm(angry ~ female_treat + womanrespondent + pknowledge + securitycouncilcorrect 
                                          + as.numeric(partywarmth_1) + as.numeric(partywarmth_2) + as.numeric(partywarmth_3) 
                                          + Christian  + age + as.factor(ruralurban)  + as.factor(state) + firstlanguage_Afrikaans + 
                                            + firstlanguage_Ndebele  + firstlanguage_Other  + firstlanguage_Pedi 
                                          + firstlanguage_Sotho  + firstlanguage_Swati +  + firstlanguage_Tsonga
                                          + firstlanguage_Tswana  + firstlanguage_Venda  + firstlanguage_Xhosa 
                                          + firstlanguage_Zulu, data=  south.africa.2))

summary(mod.controls.mistake.south.africa.2 <- lm(mistake_tosend ~ female_treat + womanrespondent + pknowledge + securitycouncilcorrect 
                                                  + as.numeric(partywarmth_1) + as.numeric(partywarmth_2) + as.numeric(partywarmth_3) 
                                                  + Christian  + age + as.factor(ruralurban)  + as.factor(state) + firstlanguage_Afrikaans + 
                                                    + firstlanguage_Ndebele  + firstlanguage_Other  + firstlanguage_Pedi 
                                                  + firstlanguage_Sotho  + firstlanguage_Swati +  + firstlanguage_Tsonga
                                                  + firstlanguage_Tswana  + firstlanguage_Venda  + firstlanguage_Xhosa 
                                                  + firstlanguage_Zulu, data=  south.africa.2))



summary(mod.controls.sexism.south.africa.2 <- lm(moreoverallsexism~female_treat + womanrespondent + pknowledge + securitycouncilcorrect 
                                                 + as.numeric(partywarmth_1) + as.numeric(partywarmth_2) + as.numeric(partywarmth_3) 
                                                 + Christian  + age + as.factor(ruralurban)  + as.factor(state) + firstlanguage_Afrikaans + 
                                                   + firstlanguage_Ndebele  + firstlanguage_Other  + firstlanguage_Pedi 
                                                 + firstlanguage_Sotho  + firstlanguage_Swati +  + firstlanguage_Tsonga
                                                 + firstlanguage_Tswana  + firstlanguage_Venda  + firstlanguage_Xhosa 
                                                 + firstlanguage_Zulu, data=  south.africa.2))




stargazer(mod.controls.contributepk.south.africa.2, mod.controls.contributemondy.south.africa.2,
          mod.controls.sad.south.africa.2,mod.controls.angry.africa.2,mod.controls.mistake.south.africa.2,
          mod.controls.sexism.south.africa.2,digits=2)







################################################################################################################################


####Control for Manipulation Pass###

#India 1
summary(mod.contributepk.india.1.manipulationcontrol <- lm(contributePK ~ female_treat + manipulation_pass, data=india.1 ))
summary(mod.contributemoney.india.1.manipulationcontrol <- lm(contributemoney ~ female_treat + manipulation_pass, data=india.1 ))

summary(mod.sexism.india.1.manipulationcontrol <- lm(moreoverallsexism~ female_treat + manipulation_pass, data=india.1 ))


stargazer(mod.contributepk.india.1.manipulationcontrol,mod.contributemoney.india.1.manipulationcontrol,
          mod.sexism.india.1.manipulationcontrol, digits=2)


#South Africa 1
summary(mod.contributepk.south.africa.1.manipulationcontrol <- lm(contributePK ~ female_treat + manipulation_pass, data=south.africa.1 ))
summary(mod.contributemoney.south.africa.1.manipulationcontrol <- lm(contributemoney ~ female_treat + manipulation_pass, data=south.africa.1 ))

summary(mod.sexism.south.africa.1.manipulationcontrol <- lm(moreoverallsexism~ female_treat + manipulation_pass, data=south.africa.1 ))


stargazer(mod.contributepk.south.africa.1.manipulationcontrol,mod.contributemoney.south.africa.1.manipulationcontrol,
          mod.sexism.south.africa.1.manipulationcontrol,digits=2)




#India 2
summary(mod.contributepk.india.2.manipulationcontrol <- lm(contributePK ~ female_treat + manipulation_pass, data=india.2 ))
summary(mod.contributemoney.india.2.manipulationcontrol <- lm(contributemoney ~ female_treat + manipulation_pass, data=india.2 ))

summary(mod.sad.india.2.manipulationcontrol <- lm(sad~ female_treat + manipulation_pass, data=india.2 ))
summary(mod.angry.india.2.manipulationcontrol <- lm(angry ~ female_treat + manipulation_pass, data=india.2 ))
summary(mod.mistake.india.2.manipulationcontrol <- lm(mistake_tosend ~ female_treat + manipulation_pass, data=india.2 ))


summary(mod.sexism.india.2.manipulationcontrol <- lm(moreoverallsexism~ female_treat + manipulation_pass, data=india.2 ))


stargazer(mod.contributepk.india.2.manipulationcontrol,mod.contributemoney.india.2.manipulationcontrol,
          mod.sad.india.2.manipulationcontrol,mod.angry.india.2.manipulationcontrol,mod.mistake.india.2.manipulationcontrol,mod.sexism.india.2.manipulationcontrol, digits=2)




#South Africa 2
summary(mod.contributepk.south.africa.2.manipulationcontrol <- lm(contributePK ~ female_treat + manipulation_pass, data=south.africa.2 ))
summary(mod.contributemoney.south.africa.2.manipulationcontrol <- lm(contributemoney ~ female_treat + manipulation_pass, data=south.africa.2 ))

summary(mod.sad.south.africa.2.manipulationcontrol <- lm(sad~ female_treat + manipulation_pass, data=south.africa.2 ))
summary(mod.angry.south.africa.2.manipulationcontrol <- lm(angry ~ female_treat + manipulation_pass, data=south.africa.2 ))
summary(mod.mistake.south.africa.2.manipulationcontrol <- lm(mistake_tosend ~ female_treat + manipulation_pass, data=south.africa.2 ))


summary(mod.sexism.south.africa.2.manipulationcontrol <- lm(moreoverallsexism~ female_treat + manipulation_pass, data=south.africa.2 ))


stargazer(mod.contributepk.south.africa.2.manipulationcontrol,mod.contributemoney.south.africa.2.manipulationcontrol,
          mod.sad.south.africa.2.manipulationcontrol,mod.angry.south.africa.2.manipulationcontrol,mod.mistake.south.africa.2.manipulationcontrol, 
          mod.sexism.south.africa.2.manipulationcontrol,digits=2)






################################################################################################################################


##alternative measures of support for women's rights/gender equality##


#men better at combat than women#
summary(mod.combatmen.india.1 <- lm(as.numeric(combatmen) ~ female_treat, data=india.1 ))
summary(mod.combatmen.south.africa.1 <- lm(as.numeric(combatmen) ~ female_treat, data=south.africa.1 ))
summary(mod.combatmen.india.2 <- lm(as.numeric(combatmen) ~ female_treat, data=india.2 ))
summary(mod.combatmen.south.africa.2 <- lm(as.numeric(combatmen) ~ female_treat, data=south.africa.2 ))

stargazer(mod.combatmen.india.1,mod.combatmen.south.africa.1,mod.combatmen.india.2 ,mod.combatmen.south.africa.2,digits=2)


#sexist stereotypes - hostile towards women#

south.africa.1$sexistviewshostile <- south.africa.1$gendercontrols_1 + south.africa.1$gendercontrols_2  + south.africa.1$gendercontrols_4 + south.africa.1$gendercontrols_13
south.africa.1$sexistviewsbenevolent <- south.africa.1$gendercontrols_5 + south.africa.1$gendercontrols_6 + south.africa.1$gendercontrols_7 + south.africa.1$gendercontrols_8
south.africa.1$lesssupportge <- south.africa.1$gendercontrols_10 + south.africa.1$gendercontrols_11 
south.africa.1$traditionalgenderroles <- south.africa.1$gendercontrols_12 + south.africa.1$gendercontrols_13 + south.africa.1$gendercontrols_14 + south.africa.1$gendercontrols_3

south.africa.2$sexistviewshostile <- south.africa.2$gendercontrols_1 + south.africa.2$gendercontrols_2 + south.africa.2$gendercontrols_4 + south.africa.2$gendercontrols_13
south.africa.2$sexistviewsbenevolent <- south.africa.2$gendercontrols_5 + south.africa.2$gendercontrols_6 + south.africa.2$gendercontrols_7 + south.africa.2$gendercontrols_8
south.africa.2$lesssupportge <- south.africa.2$gendercontrols_10 + south.africa.2$gendercontrols_11 
south.africa.2$traditionalgenderroles <- south.africa.2$gendercontrols_12 + south.africa.2$gendercontrols_13 + south.africa.2$gendercontrols_14 + south.africa.2$gendercontrols_3

india.1$sexistviewshostile <- india.1$gendercontrols_1 + india.1$gendercontrols_2+ india.1$gendercontrols_4 + india.1$gendercontrols_13
india.1$sexistviewsbenevolent <- india.1$gendercontrols_5 + india.1$gendercontrols_6 + india.1$gendercontrols_7 + india.1$gendercontrols_8
india.1$lesssupportge <- india.1$gendercontrols_10 + india.1$gendercontrols_11 
india.1$traditionalgenderroles <- india.1$gendercontrols_12 + india.1$gendercontrols_13 + india.1$gendercontrols_14+ india.1$gendercontrols_3

india.2$sexistviewshostile <- india.2$gendercontrols_1 + india.2$gendercontrols_2  + india.2$gendercontrols_4 + india.2$gendercontrols_13
india.2$sexistviewsbenevolent <- india.2$gendercontrols_5 + india.2$gendercontrols_6 + india.2$gendercontrols_7 + india.2$gendercontrols_8
india.2$lesssupportge <- india.2$gendercontrols_10 + india.2$gendercontrols_11 
india.2$traditionalgenderroles <- india.2$gendercontrols_12 + india.2$gendercontrols_13 + india.2$gendercontrols_14 + india.2$gendercontrols_3

summary(mod.sexistviewshostile.india.1 <- lm(as.numeric(sexistviewshostile) ~ female_treat, data=india.1 ))
summary(mod.sexistviewshostile.south.africa.1 <- lm(as.numeric(sexistviewshostile) ~ female_treat, data=south.africa.1 ))
summary(mod.sexistviewshostile.india.2 <- lm(as.numeric(sexistviewshostile) ~ female_treat, data=india.2 ))
summary(mod.sexistviewshostile.south.africa.2 <- lm(as.numeric(sexistviewshostile) ~ female_treat, data=south.africa.2 ))

stargazer(mod.sexistviewshostile.india.1,mod.sexistviewshostile.south.africa.1,
          mod.sexistviewshostile.india.2,mod.sexistviewshostile.south.africa.2, digits=2)

summary(mod.sexistviewsbenevolent.india.1 <- lm(as.numeric(sexistviewsbenevolent) ~ female_treat, data=india.1 ))
summary(mod.sexistviewsbenevolent.south.africa.1 <- lm(as.numeric(sexistviewsbenevolent) ~ female_treat, data=south.africa.1 ))
summary(mod.sexistviewsbenevolent.india.2 <- lm(as.numeric(sexistviewsbenevolent) ~ female_treat, data=india.2 ))
summary(mod.sexistviewsbenevolent.south.africa.2 <- lm(as.numeric(sexistviewsbenevolent) ~ female_treat, data=south.africa.2 ))

stargazer(mod.sexistviewsbenevolent.india.1,mod.sexistviewsbenevolent.south.africa.1,
          mod.sexistviewsbenevolent.india.2,mod.sexistviewsbenevolent.south.africa.2, digits=2)

summary(mod.lesssupportge.india.1 <- lm(as.numeric(lesssupportge) ~ female_treat, data=india.1 ))
summary(mod.lesssupportge.south.africa.1 <- lm(as.numeric(lesssupportge) ~ female_treat, data=south.africa.1 ))
summary(mod.lesssupportge.india.2 <- lm(as.numeric(lesssupportge) ~ female_treat, data=india.2 ))
summary(mod.lesssupportge.south.africa.2 <- lm(as.numeric(lesssupportge) ~ female_treat, data=south.africa.2 ))

stargazer(mod.lesssupportge.india.1,mod.lesssupportge.south.africa.1,
          mod.lesssupportge.india.2,mod.lesssupportge.south.africa.2, digits=2)

summary(mod.traditionalgenderroles.india.1 <- lm(as.numeric(traditionalgenderroles) ~ female_treat, data=india.1 ))
summary(mod.traditionalgenderroles.south.africa.1 <- lm(as.numeric(traditionalgenderroles) ~ female_treat, data=south.africa.1 ))
summary(mod.traditionalgenderroles.india.2 <- lm(as.numeric(traditionalgenderroles) ~ female_treat, data=india.2 ))
summary(mod.traditionalgenderroles.south.africa.2 <- lm(as.numeric(traditionalgenderroles) ~ female_treat, data=south.africa.2 ))

stargazer(mod.traditionalgenderroles.india.1,mod.traditionalgenderroles.south.africa.1,
          mod.traditionalgenderroles.india.2,mod.traditionalgenderroles.south.africa.2, digits=2)


################################################################################################################################
##Bonferonni Correction##

pairwise.t.test(india.1$contributePK, india.1$female_treat, p.adjust.method="bonferroni")
pairwise.t.test(india.1$contributemoney, india.1$female_treat, p.adjust.method="bonferroni")
pairwise.t.test(india.1$moreoverallsexism, india.1$female_treat, p.adjust.method="bonferroni")


pairwise.t.test(south.africa.1$contributePK, south.africa.1$female_treat, p.adjust.method="bonferroni")
pairwise.t.test(south.africa.1$contributemoney, south.africa.1$female_treat, p.adjust.method="bonferroni")
pairwise.t.test(south.africa.1$moreoverallsexism, south.africa.1$female_treat, p.adjust.method="bonferroni")

pairwise.t.test(india.2$contributePK, india.2$female_treat, p.adjust.method="bonferroni")
pairwise.t.test(india.2$contributemoney, india.2$female_treat, p.adjust.method="bonferroni")
pairwise.t.test(india.2$sad, india.2$female_treat, p.adjust.method="bonferroni")
pairwise.t.test(india.2$angry, india.2$female_treat, p.adjust.method="bonferroni")
pairwise.t.test(india.2$mistake_tosend, india.2$female_treat, p.adjust.method="bonferroni")
pairwise.t.test(india.2$moreoverallsexism, india.2$female_treat, p.adjust.method="bonferroni")

pairwise.t.test(south.africa.2$contributePK, south.africa.2$female_treat, p.adjust.method="bonferroni")
pairwise.t.test(south.africa.2$contributemoney, south.africa.2$female_treat, p.adjust.method="bonferroni")
pairwise.t.test(south.africa.2$sad, south.africa.2$female_treat, p.adjust.method="bonferroni")
pairwise.t.test(south.africa.2$angry, south.africa.2$female_treat, p.adjust.method="bonferroni")
pairwise.t.test(south.africa.2$mistake_tosend, south.africa.2$female_treat, p.adjust.method="bonferroni")
pairwise.t.test(south.africa.2$moreoverallsexism, south.africa.2$female_treat, p.adjust.method="bonferroni")





###################################################################################################################################################
###code suspicious or relevant open-ended responses###

#South Africa 1
south.africa.1$otheropenended_relevant[is.na(south.africa.1$otheropenended_relevant)] <- 0
south.africa.1$otheropenended_suspicious[is.na(south.africa.1$otheropenended_suspicious)] <- 0
south.africa.1$otheropenended_suspiciousbroader[is.na(south.africa.1$otheropenended_suspiciousbroader)] <- 0

summary(south.africa.1$otheropenended_relevant) #19% were relevant
summary(south.africa.1$otheropenended_suspicious) #5% were suspicious 
summary(south.africa.1$otheropenended_suspiciousbroader) #6% were suspicious 


#India I
india.1$otheropenended_relevant[is.na(india.1$otheropenended_relevant)] <- 0
india.1$otheropenended_suspicious[is.na(india.1$otheropenended_suspicious)] <- 0
india.1$otheropenended_suspiciousbroader[is.na(india.1$otheropenended_suspiciousbroader)] <- 0

summary(india.1$otheropenended_relevant) #3% were relevant
summary(india.1$otheropenended_suspicious) #20% were suspicious 
summary(india.1$otheropenended_suspiciousbroader) #26% were suspicious 



#South Africa 2
south.africa.2$otheropenended_relevant[is.na(south.africa.2$otheropenended_relevant)] <- 0
south.africa.2$otheropenended_suspicious[is.na(south.africa.2$otheropenended_suspicious)] <- 0
south.africa.2$otheropenended_suspiciousbroader[is.na(south.africa.2$otheropenended_suspiciousbroader)] <- 0

summary(south.africa.2$otheropenended_relevant) #30% were relevant
summary(south.africa.2$otheropenended_suspicious) #6% were suspicious 
summary(south.africa.2$otheropenended_suspiciousbroader) #6% were suspicious 


#India 2
india.2$otheropenended_relevant[is.na(india.2$otheropenended_relevant)] <- 0
india.2$otheropenended_suspicious[is.na(india.2$otheropenended_suspicious)] <- 0
india.2$otheropenended_suspiciousbroader[is.na(india.2$otheropenended_suspiciousbroader)] <- 0

summary(india.2$otheropenended_relevant) #10% were relevant
summary(india.2$otheropenended_suspicious) #38% were suspicious 
summary(india.2$otheropenended_suspiciousbroader) #42% were suspicious 



####Control for Suspicious Answers for India Sample###

#Experiment 1#
summary(mod.contributepk.india.1.suscontrol <- lm(contributePK ~ female_treat + otheropenended_suspicious, data=india.1 ))
summary(mod.contributemoney.india.1.suscontrol <- lm(contributemoney ~ female_treat + otheropenended_suspicious, data=india.1 ))

summary(mod.sexism.india.1.suscontrol <- lm(moreoverallsexism~ female_treat + otheropenended_suspicious, data=india.1 ))


stargazer(mod.contributepk.india.1.suscontrol,mod.contributemoney.india.1.suscontrol,
          mod.sexism.india.1.suscontrol,digits=2)

#Experiment 2#
summary(mod.contributepk.india.2.suscontrol <- lm(contributePK ~ female_treat + otheropenended_suspicious, data=india.2 ))
summary(mod.contributemoney.india.2.suscontrol <- lm(contributemoney ~ female_treat + otheropenended_suspicious, data=india.2 ))

summary(mod.angry.india.2.suscontrol <- lm(angry~ female_treat + otheropenended_suspicious, data=india.2 ))
summary(mod.sad.india.2.suscontrol <- lm(sad ~ female_treat + otheropenended_suspicious, data=india.2 ))
summary(mod.mistake.india.2.suscontrol <- lm(mistake_tosend ~ female_treat + otheropenended_suspicious, data=india.2 ))


summary(mod.sexism.india.2.suscontrol <- lm(moreoverallsexism~ female_treat + otheropenended_suspicious, data=india.2 ))


stargazer(mod.contributepk.india.2.suscontrol,mod.contributemoney.india.2.suscontrol,
          mod.angry.india.2.suscontrol,mod.sad.india.2.suscontrol,mod.mistake.india.2.suscontrol,mod.sexism.india.2.suscontrol,digits=2)





##Supicious Responses removed##

#Experiment 1
india.1.nosus <- subset(india.1, india.1$otheropenended_suspicious==0)

summary(mod.contributepk.india.1.nosus <- lm(contributePK ~ female_treat, data=india.1.nosus ))
summary(mod.contributemoney.india.1.nosus <- lm(contributemoney ~ female_treat, data=india.1.nosus ))

summary(mod.sexism.india.1.nosus <- lm(moreoverallsexism~ female_treat , data=india.1.nosus ))

stargazer(mod.contributepk.india.1.nosus,mod.contributemoney.india.1.nosus,
          mod.sexism.india.1.nosus,digits=2)


#Experiment 2#
india.2.nosus <- subset(india.2, india.2$otheropenended_suspicious==0)

summary(mod.contributepk.india.2.nosus <- lm(contributePK ~ female_treat, data=india.2.nosus ))
summary(mod.contributemoney.india.2.nosus <- lm(contributemoney ~ female_treat, data=india.2.nosus ))

summary(mod.angry.india.2.nosus <- lm(angry~ female_treat , data=india.2.nosus ))
summary(mod.sad.india.2.nosus <- lm(sad ~ female_treat , data=india.2.nosus ))
summary(mod.mistake.india.2.nosus <- lm(mistake_tosend ~ female_treat , data=india.2.nosus ))

summary(mod.sexism.india.2.nosus <- lm(moreoverallsexism~ female_treat , data=india.2.nosus ))

stargazer(mod.contributepk.india.2.nosus,mod.contributemoney.india.2.nosus,
          mod.angry.india.2.nosus,mod.sad.india.2.nosus,mod.mistake.india.2.nosus,mod.sexism.india.2.nosus,digits=2)




###################################################################################################################################################


#####sadness as a control####
summary(mod.contributepk.southafrica.2.sadcontrol <- lm(as.numeric(south.africa.2$contributePK) ~ female_treat + sad, data=south.africa.2 ))
summary(mod.contributemoney.southafrica.2.sadcontrol <- lm(as.numeric(contributemoney) ~ female_treat + sad, data=south.africa.2 ))
summary(mod.angry.southafrica.2.sadcontrol <- lm(as.numeric(angry) ~ female_treat + sad, data=south.africa.2 ))
summary(mod.misake.southafria.2.sadcontrol <- lm(as.numeric(mistake_tosend) ~ female_treat + sad, data=south.africa.2 ))
summary(mod.sexism.southafrica.2.sadcontrol <- lm(as.numeric(moreoverallsexism) ~ female_treat + sad, data=south.africa.2 ))

stargazer(mod.contributepk.southafrica.2.sadcontrol,mod.contributemoney.southafrica.2.sadcontrol,
          mod.angry.southafrica.2.sadcontrol,mod.misake.southafria.2.sadcontrol,mod.sexism.southafrica.2.sadcontrol,digits=2)



#####sadness as an interaction####
summary(mod.contributepk.southafrica.2.sadinteraction <- lm(as.numeric(south.africa.2$contributePK) ~ female_treat*sad, data=south.africa.2 ))
summary(mod.contributemoney.southafrica.2.sadinteraction <- lm(as.numeric(contributemoney) ~ female_treat*sad, data=south.africa.2 ))
summary(mod.angry.southafrica.2.sadinteraction <- lm(as.numeric(angry) ~ female_treat*sad, data=south.africa.2 ))
summary(mod.misake.southafria.2.sadinteraction <- lm(as.numeric(mistake_tosend) ~ female_treat*sad, data=south.africa.2 ))
summary(mod.sexism.southafrica.2.sadinteraction <- lm(as.numeric(moreoverallsexism) ~ female_treat*sad, data=south.africa.2 ))

stargazer(mod.contributepk.southafrica.2.sadinteraction,mod.contributemoney.southafrica.2.sadinteraction,
          mod.angry.southafrica.2.sadinteraction,mod.misake.southafria.2.sadinteraction,mod.sexism.southafrica.2.sadinteraction,digits=2)




#####sadness as a control####
summary(mod.contributepk.southafrica.2.sadcontrol <- lm(as.numeric(south.africa.2$contributePK) ~ female_treat + sad, data=south.africa.2 ))
summary(mod.contributemoney.southafrica.2.sadcontrol <- lm(as.numeric(contributemoney) ~ female_treat + sad, data=south.africa.2 ))
summary(mod.angry.southafrica.2.sadcontrol <- lm(as.numeric(angry) ~ female_treat + sad, data=south.africa.2 ))
summary(mod.misake.southafria.2.sadcontrol <- lm(as.numeric(mistake_tosend) ~ female_treat + sad, data=south.africa.2 ))
summary(mod.sexism.southafrica.2.sadcontrol <- lm(as.numeric(moreoverallsexism) ~ female_treat + sad, data=south.africa.2 ))

stargazer(mod.contributepk.southafrica.2.sadcontrol,mod.contributemoney.southafrica.2.sadcontrol,
          mod.angry.southafrica.2.sadcontrol,mod.misake.southafria.2.sadcontrol,mod.sexism.southafrica.2.sadcontrol,digits=2)




#end 